Q1: You can either block all travel from the wormhole (a la Embargo) or phase out/destroy/whatever any ship travelling between any two selected planets. (you can give an ability to the wormhole so the interdictor ability only works at wormholes) This would require an "interdictor" to be present at either one of the wormholes in question: You can either apply the buff to incoming ships, or apply it upon departing and then check wether the destination is a wormhole.
I don't know when exactly the OnHyperspaceExit trigger applies, and whether it would be possible to interrupt a phase jump with it.
One problem with this method is that anyone traveling between non-linked wormholes (adjacent or via phase stabilisers) is going to get zapped despite not actually using the wormhole
Q2: You can activate/deactivate the shield mesh, which is used by the TEC shield generator. This only allows you to have two appearances though: shielded and unshielded. Other than that I know of no ability that changes textures at all, and only a few researches/SBupgrades change the meshes of units (note: not planets).
On resource asteroids (Q3):
I couldn't even find it in the gameplay.constants file. I guess it's tied to the "buildable gravity well" i.e. the yellow circle in which you can place structures. (At least I can't recall seeing any asteroids outside that circle, maybe I'm just blind)
Q4: You can "upgrade" them via resource-costing abilities you give to the extractors. You can make them "colonisable" by using the "capture neutral extractor" ability, possibly in conjunction with a custom mine phase cloaking to prevent enemies from stealing them once colonised. You can simulate "razing" by making them immune to damage and giving the siege frigates an ability that removes said immunity, though this would render capships unable to damage them
Q6: I guess so, you'll need a stackable buff to count the ships, but I can't think of a way of counting the number of stacks, let alone making that a condition for the ability/buff. You will probably end up with an ability that is used and does nothing if the requirements aren't met, instead of the game not allowing you to cast it.
For the trade ports (Q7):
Can you create planetmodules with the CreateFrigate (Sova Missile Battery) modifier? If yes that could be used to create the trade port. (Try it, and if the game minidumps, bad luck)
@GoaFan77: I'm guessing your workaround involves transforming the frigate to a starbase? That won't work, because there's a limit on the number of SBs allowed around any planet (1 per player without mods)
However, you can always transform something into a frigate: Give it an ability with a "CreateFrigate" action buff, followed by a "MakeDead" action on the "morphing" ship. It will display an explosion (enemies might be awarded XP), but you get your frigate. The only direct "morphing" actions in the game (that I know of) are DeployStarBase, which only creates SBs, and ConvertFightersToMines, used by Advent Mine Squads (works only with SC).