You can use a language like OCaml without allocating and still capture huge benefits over C++, like a decent type system, ADTs, and better abstractions than templates (modules in OCaml's case).
Rust type's system has a similar power level to OCaml's but without modules (which are used heavily at JS) and with linear types/lifetimes. Rust would probably be a good fit for JS, but of course it takes a lot to overcome the momentum of 20 years of using primarily one language.
I think you are ascribing too much thought to Jane Street's decision to use OCaml. I think it was a good choice, on balance, but from what I heard/read when I worked there it was mostly just circumstantial.