Nextcloud aio on docker is pretty easy. You just need to setup the reverse proxy really (i think on port 11000 if i remember correctly). It does come with apache so you could open it directly in your router but guessing you might have other services.
Yeah it sounds like Androids aggressive battery helper is causing this.
Is there any benefit to browsing private mode? Its only stopping history on your phone and not websites, so you can just set normal mode to not save history, cookies etc. Private mode is designed to be temporary in stopping your phone recording history and one button to close them all, so its not surprising that it doesn’t save tabs, in fact its a feature