This is exactly what I was thinking, the most advanced LaTeX typesetter is probably mathjax, but it can't and probably won't [1] handle full LaTeX.
Just consider this pretty simple LaTeX,
\begin{align}
x &= 2^2
\intertext{so we can simplify}
&= 4
\end{align}
With a little bit of fanciness (sourcing the .sty sheets) behind the scenes, this could faithfully reproduce LaTeX.
[1] https://github.com/mathjax/MathJax/issues/736
Edit: formatting