I use Microsoft OneDrive to instantly upload my photos to the Camera Roll, and then I use a rclone daemon to move the images to 2 backup locations (after applying encryption).
I tried the way of uploading directly to my target backup locations from my phone using RCX (rclone for Android), but uploading camera roll at convenient times, automatic retry, and features like automatic albums and such are nice to have and hard to get in open-source software, so I stuck with OD.
rclone has a dedicated googlephotos source/sink module, so you can look into it.