The JS interpreter is single threaded. But, you can offload the work to a web worker, that runs another instance of the interpreter in a separate thread.
Also for rendering LaTex it’s possible to optimize the rendering algorithm using WASM.
I’m not saying that MathJax does that, or it has good performance. But, there are options to optimize the client side rendering.
I don't know enough about the state of WASM today to say the same. Circa 2018 I know that it lacked DOM manipulation.
(In some distant year I will figure out the incantation to avoid getting sniped when talking about this stuff. I think I rewrote that line 4 times.)
Because we have to participate in the main thread either way, prerendered images will always paint faster. There is simply too much action in the thread during the initial GitHub page lifecycle. The 40-50ms (~one long task) cost of spinning up a new web worker just solidifies that.
You're right on the money with the server costs though.