Here's the thing nothing is truly eternal.
Your going to time to create a virtual machine so you can isolate all requirements into a single container.
Then have multiple copies.
Your going to have to multiple archived copies of all relevant software in multiple locations.
As long as you keep your virtual machine software up to date it should last a long time....
I had a similar requirement and ended up with
Piwigo.org 11 Photo gallery hosted on a private web server
Plugin https://github.com/cccraig/MugShot (I had to use the master branch which is mostly compatible with Piwigo 11) - this let's you draw rectangles and tag persons
In addition to your requirement I wanted to be able to share and collaboratively tag ...