Make a unit untrainable first using the set construction avaliablity for player action.
When a player research an upgrade.
Allow training of the unit by that player.
No, thats the best way.
Look at some unprotected altered meele map.
Or at least look at how other chaos based abilities is done.
Like siege tank morphing into a siege tank with barrage.
This action:
Player - Make Footman Available for training/construction by Player 1 (Red)
Or
Find Tauren Totem
Scroll down until you see Techtree-Unit trained
Add your campiagn unit there!