As one accumulates lots of both finished images and subs, it soon gets to a stage where you have thousands of files.
There are a variety of ways to store these - either in a set of folders, or using a program like Lightroom that helps organize files and lets you search on them.
In the case of astro images we have a very specific way we can search for them which is by RA, Dec. If you store the images in a database that can do searches by RA Dec then in principle you could find subs from years back which overlap with a shot you are doing today, and thus could be stacked with it.
I don't know if any RA Dec oriented image databases exist - but somebody may have created one.
An alternative might be to use a program that allows geo-tagging images with Latitude, Longitude, and basically lie about the coordinates - i.e. set Longitude to the Right Ascension (in degrees) and Latitude to Declination. In principle that ought to work - the math for determining distance in Lat-Long space is very similar to that for RA, Dec. That would allow RA, Dec queries.
Yet another alternative would be a planetarium program that allowed one to bring up images you had taken in context. I know that some planetarium program can do something like this for an image or two, but I don't know of any that could store and (effectively) index into hundreds or thousands of images.
Anyway, I am curious to what others have done.