I think the time to get rich off JavaScript is now - I hear webshops still pay ludicrous salaries, but junior web developers are being manufactured in great quantity, so the market will eventually saturate.
Another way of looking at this is: it's a great life extension hack!
One of the problems with cryonics is, how to motivate future people to revive you in the first place? Learning (and having it documented) a technology on which global economy is going to be critically dependent for decades to come sounds like it should do the trick.
(Another problem is, how to motivate earlier future people to keep you around until your value becomes apparent, which will likely happen only when your services are direly needed on short notice.)
And I'm not saying this because I think it's the best ever, or because I don't learn from history and how things change.
It's the nature of the web. We're still dragging things from HTTP/0.9 and and from HTML 1.0 along.
But also, JS is a capable script engine with millions of USD put into engineering VMs into it, and the networks effects are inescapable. I don't see WASM replacing it either. They'll be used in tandem.
I predict JavaScript will be the Fortran of 2040