The problem

New players often try to build every available defense type, including structures that require unavailable resources. This results in wasted labor and reduced planetary labor output from having labor split between a bunch of defense structures

The Solution

Defense structures (not just their produced units) should require access to the appropriate resource types before they can be built

If there are no resource deposits on the planet, AND no resources in reserve on the planet, AND no appropriate trade route, the structure should be visible as an option but not buildable, with an explanation that the structure requires resources that are not available on the planet.

For example, the plasma tower unit requires chronimium, hexacarbide and trillum to build, so its corresponding structure should require access to these resources via deposits or trade routes before the structure can be built.

Also, labor should automatically be allocated away from any defense that is no longer buildable due to TL drops or loss of access to a needed resource. Alternately, when TLs drop defense structures should automatically regress to lower types while still retaining labor allocations (e.g. plasma tower networks regress to HEL cannon networks, hypersonics stop being built and GDMs start getting built).