How many of those photos do you need?
You can use de-googled phones and Immich. I use a sync app ("FolderSync") to upload-then-delete to my server over Tailscale, then Immich picks them up. So I never have storage issues on my phone.
Immich looks like they're trying hard to be a Google Photos clone as far as I can tell. It's a good Android app
I was looking for things like backing up my phone contents to a PC or syncing a music/photo library to my phone and the options I found were brittle python scripts using adb.
FolderSync does exactly what I want and just works. No affiliation just happy customer/user.
Definitely worth the mere 10 EUR for the lifetime Pro version!
I did run CyanogenMod / LineageOS for several years but the reliability I needed just wasn’t there. This may have improved since then, though.
But if you have them already on your server then just some tailscale/wireguard perhaps might work for you.