> if the user changes the page by pressing the Back button, then Phoenix closes the socket, creates a new one, and the state is lost
I don't think that has to be the case. You can use "patch" style links to navigate from page to page in the same session.