If I might get back on topic, there are at least 2 aspects to not losing your photos: up to date storage and image file format. In my case, I've tried to be diligent when newer storage technology came out I would transfer files from the old storage tech to the newer one before the "old tech" got so out of date that I could no longer easily find a way to connect/transfer the old with the new. So, like I said earlier, I've continued to transfer files from everything from 3.5 floppies and Zip discs to modern hard drives and SSDs.
When it comes to digital image file formats, this also requires some diligence and staying in touch with the most common formats. JPGs aren't the greatest file format but it doesn't seem to be losing options when it comes to viewing/editing software, and the same for TIFF files. PNG files have gained in popularity but still not as common as JPGs, from my rough estimate. As for RAW files, I do have several RAW file formats that I maintain from Sony, Canon and Fujifilm cameras. Camera Raw can open all of them (for now), so I'm not panicked about conversion, but for my most recent RAW files (RAF), I convert them to DNG format for storage and editing. Many RAW files that had promise for printing I've edited and created TIFF files for printing purposes, and I do retain PSD files as well. Sometimes I have TIFF and PSD files of the same image - yeah its a duplication, but I'll wait until storage space becomes a problem or when I decide to dump Photoshop before I get rid of the PSD files. PCD files (PhotoCD) files were mentioned earlier - I do have 2 CDs worth of PCD files and many years ago converted many of them to TIFF files, but in the end all I have to do is scan the negatives myself if I really want to print something from those 2 PhotoCDs from 1996. My film archives go back to 1971 or so...
As I said, ensuring that you don't lose any images (film or digital) requires diligence not to mention cost and time.