Does such software already exist? Yes. It is called Numistudy and it was developed by Jon Lusk. It's been available to the EAC people since January 2002. It's been through four generations of software development now. I need to play around with it but it is truly something else. It does a lot more than what has been mentioned here so far.
As for overlaying images you select the images you want to overlay and then set two reference points on each image. (You can magnify the area of the coin where you are placing each point so you placement is as exact as possible. Set the same points in the same order on each image an then instruct it to do an overlay. The program automatically sets both images to the exact same size and rotation and overlays the images so the reference points match up. (One thing it can't correct for is if the images have been shot at an angle or different angles. They need to be straight on shots obviously.) You can also then adjust transparency of one image ot the other to fade it in and out the see how everything matches up.
The program was developed for doing or confirming attributions of your own images against a database of Condition Census coins from Bill Noyes image databases. (Bill has images of the top 12 to 25 coins known coins for all of the early middle and I think late date large cent varieties, and the
Half Cents. Bill also collects Conder tokens so he is developing a database for those as well.) But you can create your own image databases as well.
Cost of the program is very high if you want it with the Noyes image databases, several thousand dollars per database. The program itself is rather reasonable though. I have the third version (and If I provide him with a disk Jon will upgrade me to Version 4 for free.) which I bought several years ago without any of the databases, and it cost me $189. I've been building my own databases for it for several different series. I haven't done too much with it though. I need to get back into it and play around with it some more. If you want to know more about it I can give you Jon's contact information.