This idea is very similar to what I've been working on for a while, local-first apps that synchronize data over a server that can be self-hosted. In my case, I'm using the Solid Protocol, and there are already many Open Source servers implementing this protocol.
If you're curious, check out this app: https://umai.noeldemartin.com/