For iCloud, would just copying images from iCloud to the backup media be enough?
I really wish Apple had a complete export button, similar to google takeout. Or at least a good CLI tool to get the original images one by one.
Fwiw my library is ~200k files and close to a TB.
I rsync images out of Apple’s weird file structure that’s in the bundle. It’s horrible, but with ‘download originals’ enabled it works well. It’s particularly frustrating with large libraries as they occupy nearly all an SSD. For this reason I do it all on a VM that’s on a Synology.