How to make sure those heros come at the right time and that there is only one:
make the hero cost 255 population
make other unit upgrade to hero and preplace him somewhere
(make the other unit immobile or something, not available to any nation, the cost doesn't really matter, not even the pop cost)
Now you'll be able to upgrade the other unit to the "unique" unit and you are unable to build the hero unit
I tested it, and it works, you can start producing the hero unit, but it'll never get finished
make the hero cost 255 population
make other unit upgrade to hero and preplace him somewhere
(make the other unit immobile or something, not available to any nation, the cost doesn't really matter, not even the pop cost)
Now you'll be able to upgrade the other unit to the "unique" unit and you are unable to build the hero unit
I tested it, and it works, you can start producing the hero unit, but it'll never get finished