Not only is the structure of the Photos library opaque, it keeps changing: Differs in Mojave, Catalina and Big Sur. Unless you are prepared to leave all the storage, display, metadata and other decisions about your photos to Apple and stay locked in, it’s sensible to look beyond. Creating a true backup isn’t hard: Photos Takeout app (Mac App Store) can export the Photos library in a folder hierarchy; with or without metadata; original unmodified or edited versions. This solves the storing and searching parts, and you can use those folders from Photos as well as other programs such as Lightbox. You do sacrifice the syncing bit, though: Linking this backup to Photos won’t do it because iCloud Photos Library doesn’t support as referenced files. Look forward to what solution you come up with.