You know what? This project is doing exactly that; using Emacs remotely, via a terminal
(not a shell BTW, shell is just a name for some specific language’s interpreter, that is good at launching sub processes).
It’s using the gotty library, which is an implementation of the tty in the browser.
It’s a natural extension; ttys have been ported for a few decades, starting from teleprinters to text terminals and terminal emulators.