* Java was plagued with security problems. One area where Java really shot itself in the foot was that unsigned applets were sandboxed, but signed applets had unfettered access to everything, so you had to choose between signing and sandboxing. And then once security concerns became a big thing, Sun responded by killing support for unsigned applets saying it'll increase trust, but what they really did was make the problem worse by killing the sandbox.
* Java was proprietary until long after its star had fallen.
* Java was introduced when computers weren't that powerful. The JVM took forever to start up and would slow down your whole computer while running. Most of us kept Java disabled unless we had to use an applet for something just because of the massive performance hit.
You can make similar arguments about Flash, too: it too had security holes, proprietary software, and performance issues.
There is one thing I really liked about Java and Flash, though: you could turn it off. If you don't want a site loading some heavy Flash monstrosity and eating all your RAM (I had so many issues with Flash killing the RAM on my old laptop with only 512 MB of RAM), you could just turn plugins off or install an extension to force you to click to load Flash content. You can't do that with JavaScript, so maybe WASM will bring that part of the old days back too.
NoScript?
Was there any point in the development of WASM where it made more sense to develop WASM to replace the JVM than it would have made to try fixing the problems with the JVM? Are we at that point now? It sounds like the last two problems fixed themselves.
But Javascript's dynamically typed textual representation has nothing to do with what makes it better than Java applets. It's the security model, which wasm shares.
Basically, it's a lot of the same stuff, but a (hopefully) better implementation, and promoted in a way that appeals to the people likely to use it. Start with an old technology. Tweak, relabel, and market under the new name.