Aim for the shipyards in a war. Or aim for the planets next to shipyards in a war.
Smack them down and suddenly the AI you're at war with won't be producing anything useful anymore.
In other words, arrange your invasion fleets in position such that on turn 1 or turn 2, you can wipe out all of the AI shipyards or all of the worlds near the AI shipyards in one fell swoop forcing them to produce at a distance penalty. With this you can effectively win the war on turn 1. After all, if you can wipe out their fleet production, the rest is just mop up. AI PRODUCTION BONUSES DON'T MATTER IF THEY DON'T HAVE SHIPYARDS. AND THE AI IS GENERALLY NOT SMART ENOUGH TO QUICKLY REPLACE THE SHIPYARDS THAT THEY LOSE.
Also, if the planet is heavily defended, just attack the nearby shipyard and avoid the planet itself.
Also, imagine doing this in multiplayer....
AIM FOR THE JUGULAR!!!!! IGNORE EVERYTHING ELSE IN THE EARLY PHASES OF A WAR!!!!!
Instead of attacking a heavily defended planet, WIPE OUT THEIR SHIPYARDS and instead focus on the weakly defended planets. Force their fleet to come out and fight on your terms.