A suggestion, though I haven't tested it.
To solve a different issue, I have two instances of the Recruiting Center in my PlanetImprovements.xml. The only change is the tech requirement - I wanted the Arceans to have access to it through War Rooms. It works just fine, the only issue being that it shows up twice in improvements menu on the planet screen. It doesn't break the one-per-planet requirement, though, and both disappear after either one is built.
So, you could try to cut-and-paste the AMC, then change the upgrade target to Black Market. You would end up with two instances on the improvement menu, but one of them would automatically upgrade the Black Markets. It should also remain as the upgrade target for Trade Centers.
Same thing with Temples, make another instance to upgrade the EC . . .wait, Temples don't have an upgrade target, do they? Just add the EC as the target. Should work . . .