i don't know about bought may triggers was bugged by this..(i may give a hint that you need to give at the WE all the units that building will sell and then by trigers neutral building-add or remove unittype from markets)
i did the same thing using training of a unit .. at my first version of sc battlecraft marines could be upgraded for several times, i may give to you a flat map with only this trigger
Blizzard uses Chaos that automatically changes the units in-game combined with an upgrade that changes the availability of units to be trained. However, I've never seen it tried with Sold units instead of Trained. Maybe it's worth giving a shot.
Chaos is an ability that just immediately swaps one unit for another. Make a Chaos-based ability with your tech as a requirement, and as soon as that tech is achieved, all units will "upgrade" automatically.
There i make shop with random units to sell and each button changes to next one after unit being sold. _________________________________________________ Addition:
if you want i may upgrade that triggers,so for more different situations