the mechanisms for upgrading troops is the complexity in this case and the simplest way would be for troops once in a city to have an upgrade command appear.
once selected the appropriate resources to create the extra equipment that the soldier does not already have should be deducted from the stores and the time to create the new equipment should be added to the unit queue. once all of the equipment to upgrade the unit has been created the unit should be upgraded.
as an additional optional the units obselete equipment should go into starage in the city armoury and be automatically used whenever the city trains someone to use that type of equipment deducting the cost of the equipment from the unit cost.
heroes should not be able to use said equipment.