Re "stage 2: persistent sessions", iTerm2 already does this. The PTYs are owned by background processes independent of the GUI application. So iTerm2 can upgrade the application without interrupting the running terminal sessions.
replies(2):
https://github.com/Julien-cpsn/desktop-tui
It is incomplete but takes what is almost a side aspect of TWIN and runs with it.
https://github.com/cosmos72/twin
TWIN is nearly 20 now and does quite a lot. It even has a Wikipedia page.
https://en.wikipedia.org/wiki/Twin_(windowing_system)
It runs on lots more OSes than just Linux.