Electron is awesome. And with webassembly, I think electron will be even better. Electrons success is because it offers a single Dev experience across all major platforms, windows, macOS, Linux and the web.
It's a great container for reducing the work to deliver code across platforms.
JavaScript is a necessary evil right now; it's the least common denominator for delivery. I would probably choose typescript if I were starting a new app right now to target it, though I want to play with Rust and webassembly soon.
It's success is not bc of JavaScript; it's because it merges the cross platform Dev experience.