I don't know your programming experience or what you are willing to put into it. There certainly are on-line math editors out there, so it can be done, and you might even be able to leverage one of those.
You have not really said what you want to be able to do. I suspect you are wanting to be able to not just move a cursor around, but also want to be able to edit the expression at the cursor location, including inserting new numbers or operations, as well as deleting existing ones. I don't think your simplistic approach of moving around in the output is going to work for that, as you are going to need to map the user interaction back to the underlying mathematics, and that is not easy to do from the typeset math.
The usual approach is to keep an internal representation of the mathematics as an abstract syntax tree of some sort from which you can generate the LaTeX expression that correspond to it, passing that to MathJax. Then think about having the user walk that tree and edit it instead of walking the output directly. When an edit is made, you generate the new LaTeX and have MathJax render that. You "cursor" could be implemented within the expression via a macro that displays a suitable character. For example, you could define \| to be use something like \rlap{\!\smash{\mathord{|}}} and then use
\|\frac{4}{5}
\frac{\|4}{5}
\frac{4\|}{5}
\frac{4}{\|5}
as the user moves the cursor through the expression. You would need to keep track internally of where you are in the syntax tree, and inserting the \| at the correct place. When the user enters new content, you would adjust the tree to accommodate the change, and then replace the current TeX expression with the new one generated from the modified tree.
There are some difficulties with this approach, however, as it is not easy to tell the difference between \sqrt{x+1\|} and \sqrt{x+1}\| for example, so you might need to do more to help disambiguate situations like this. As I said, this is a non-trivial undertaking, and I suspect you will find other situations that are complicated as well.
Davide