The two things that popped into my head are Immich and Nextcloud. I think Nextcloud is generally more useful, but Immich is more specifically targeted at Photos. As for how to synchronize it… Syncthing? Personally, I hate setting up Syncthing and so I don’t really use it myself anymore, but once it’s set up, it really does take care of itself. Poke the computer once a month to make sure it’s still alive, and you’re set.
You could probably host Nextcloud at one site and just have a client computer at the next site set to auto sync everything.
Been running NextCloud for a while, not for photos, but for just general Google Drive replacement.
I’ve had two different unihertz models, and neither of them could stay on any wifi, and both of them dropped calls like crazy. I contacted customer support, and they ‘offered’ to swap for another exact same phone, if I paid to ship both ways, and I didn’t mind having no phone for a month. Jelly 2, and Atom XL. The Atom was especially bad as it has a giant bloody antenna sticking out the top of it, and still no WiFi!
Avoid Unihertz.