Planet defense can work with space cannons if the enemy can be seen from a long enough distance and there are still approx. a day and a half to build up the cannons. A similar tactic may be that there are few tanks (or 0) on the planet, but a good many barracks / forts are built on it.
When the enemy fleet has almost reached the planet, you suddenly push full of tanks and then shift to 3rd gear! The next moment, the fight for the planet is already underway, and it can look fun when the enemy faces 50 tanks in ground combat. When the fleet is away, it avoids a planet loaded with tanks and searches for another planet (also weak on earth (!) Defended). This can be useful if e.g. you freshly beat back any fleet so that the cannons were barely damaged, then after the fight all of them were 98% damaged and therefore did not work. Then, as before, you pack the planet with ground units until the cannons improve, and then you have security (of course, during this time you have another planet with 0 ground defenses to have somewhere else to attack the next fleet).
One and a half days before it recovers, so radar 3 or an orbital satellite doesn’t hurt if you have one. There is also a solution that I have no ground protection. Just a shelter. Then the nerve cut off when the root Dargslan tankers scattered half my city. I tried the retreat trick, it really works. He returned to air combat once, but all of their ground cannons were pumpkin red, I just blew on and popped. In the other cases, retreat and ground fighting came.