Well call me Alice!
I will try to do this tomorrow just to see how doable and robust this approach would be. If I can get it working reasonably well without the changes being too invasive we can consider it.
If not, we should just leave it as a bug and wait for MathJax 3.x with mml3 support and see if it deals with things any better.