https://registry.hub.docker.com/r/icloudpd/icloudpd/
https://github.com/icloud-photos-downloader/icloud_photos_do...
I'll mention that with the Synology app, you can have your photos be automatically copied to your Synology. I've been doing that since I got an iPhone, so I don't have the need to download from iCloud. Actually, I don't sync my photos to iCloud since I have my local copy.
Do you have an offsite backup solution for your Synology? I do for all my most important data via Backblaze. I also used to use Arq[0] for Mac, but the UI wasn't very helpful when attempting a restore. This was probably 5y ago. I've been meaning to download and review the latest version.
I still find iCloud backups useful because hey, you can't have too many backups of your photos. I pay, I think, $4.99 / month for whatever tier of storage. But I have multiple devices syncing through it, so I understand if that's not a value-add for one phone.
It would be even cooler if my Synology could download all my photos directly from iCloud.