I've tried various self hosted photo synchronization and management solutions, multiple times.
Lychee, PiGallery2, Libre photos, Immich, and Nextcloud all fell short in different areas.
The long-term solution I've landed on is Photoprism for management and PhotoSync.
I've found Photoprism to have the most features to meet my needs (mainly albums, public links with password protection) as well as not being too resource intensive. However, there isn't a mobile app, but the mobile web interface is great.
PhotoSync is a paid app. But I've been using this for syncing for 3+ years now and it's been very reliable.
My photos are also backed up to an external drive daily and also encrypted and uploaded to Wasabi for redundancy.
Yes I have the paid version with all features. But it looks like the add-ons have been split into a few different in app purchases. Just taking a quick look at the free version, it appears to support transfer to local machines. If you want the auto transfer feature, that's a paid feature.
Syncthing is good free alternative as well. I use it primarily for documents between devices, I just haven't tried it with photos since I already have the PhotoSync app configured.
Auto transfer in photosync is super intermittent even on the paid version on Android. It seems to auto transfer only infrequently and not until you've opened the app at least once since your last reboot. If you don't open the app in between reboots the sync never really happens. I'm not saying it's not worth it to just buy the premium bundle for$4 or whatever, but it definitely does not work perfectly as expected. I'm willing to put up with a little bit of brokenness though so that I don't have to write my own.
I've been using PhotoSync (paid) as well (for years). I've set up a SMB server on a home machine. Launch PhotoSync and it shows the recent photos which haven't been synced, long-press the "quick sync" button and it uploads them. Fast and simple.