FWIW there are a _ton_ of apps for both iOS and Android that will back up your photos and videos to your home NAS/server. Whatever you go with, ensure the files aren't being mucked with during or after the transfer--Google Photos on Android may omit and/or change some metadata tags, for example.
I personally use Resilio Sync [1] (for iOS and Android) and have tested SyncThing [2] (for Android), and PhotoSync [3] (for iOS and Android). They all work well.
I personally use Resilio Sync [1] (for iOS and Android) and have tested SyncThing [2] (for Android), and PhotoSync [3] (for iOS and Android). They all work well.
[1] https://www.resilio.com/individuals/ [2] https://syncthing.net/ [3] https://www.photosync-app.com/home.html