> Software and services need a warranty. Until they have one, we completely control how much we value our data. That is the best we can do.
Best to treat these photo sharing apps, commercial or open source, as social media. Would you use Instagram or Flickr to store your most important photos and delete your own copies? I would not, same applies to Apple/Google Photos and similar apps. Besides the risk of the company suddenly shutting down or (more realistically for big tech) changing how their service works in a way that makes it useless to you, even if self hosted it just adds a bunch of things that could go wrong which don't apply to keeping it in a folder somewhere with an offsite backup. Filesystems don't have a warranty either, but at least they're easier to reason about.
Step 2 - use iCloudPD to auto download photos from iCloud in the future
I regularly back up my Photos library using rsync to prepare for the worst. From the files I see it looks like all the originals are there under /originals, albeit renamed to some UUID hash. However the EXIF data and contents seem to be intact. The number of files and their names are also stable. The database seems to be a basic sqlite DB.
I think it might make sense to extract the files directly that way, and try to see how the DB stores the original filenames. Might not be too hard. The edits though I think are applied "live" (at least for video) so it's probably impossible to get them out this way.
Photo storage and display is definitely a top 5 reason to self host these days. Restic and backblaze make a great off site backup solution because, like the OP said, this is important stuff.