Comment by jll29
You are right in pointing out that the Web browser isn't the most suitable UI paradigm for highly interactive applications like a scientific typesetting system/text editor.
I have occasionally lost a paragraph just by accidental marking a few lines and pressing [Backspace].
But at the moment, there is no better option than Overleaf, and while I encourage you to write what you propose if you can, Overleaf will be the bar that any such system needs to be compared against.
OP is talking about developing an alternative to Overleaf. But they are still trying to do it inside a browser !