Interesting challenge. Thought it might be easy using Nextcloud for a self-hosted file space but haven't worked out the details. Tried using Solid Explorer to mount the Nextcloud space, which allowed opening the file in my preferred editor instead of the one in Nextcloud Android, but it didn't auto-sync my changes (it prompted me instead). Maybe a different NC/DAV mounting app would help, or finding settings in Solid Explorer.
Also, wow... SpiderOak is still around. Didn't know!