I think I shall use this time to teach you younger players, and perhaps even the bigger ones, the strategy of fleet saving.
1) if you are constantly rebuilding your defenses without a nanite factory, you're wasting your time, and your resuources.
but I digress. Basically when a fleet attacks you that you know you can't match - don't even bother beefing up your defenses unless you have enough to take a couple out and feed off the resultign debris field. Instead, build as many cargo ships as you have resources, and make sure they are ALWAYS at the planet to be used - so don't use them to gather resources.
Then, lets say a fleet takes 2 hours to get to your planet - the initial reaction might be "oh I should pack all my stuff into cargos and send it off right away!"
if you do this a) the attacker will msot likely catch on and recall his fleet, wait, and then try again b) your resources will still continue to accumulate, and he will collect the residual resources - and you don't wanna have to give that fucker anything. Now you could turn off mine production, but why should you halt production?
Instead, wait until the VERY LAST MINUTE and THEN DEPLOY your cargoes - don't transport - use deploy instead. Also if you have any ships either send them on an expedition or deploy them as well. Deployed fleets can't be detected as well as transported ones can, and you're safer this way - and if worse comes to worse you can actually move your resources to your other planets.
THEN, when he's attacked and rawr rawred around your defenses - RECALL your deploy immediately - all your resources will return and it will be like nothing ever happened - just fix a few defenses here and there and that's it. It's like taking all your stuff out of your house before your robbed, and then putting it all back after he leaves.
Now, as you get up there in rank, you will have to go to bed. I know I know not many of us sleep anymore but we still need SOME sleep, and those players WILL figure out your patterns and will attack when you aren't there.
How to solve this? Have enough cargoes avaiilable on each planet to deploy your resources when you are asleep - set it for like, 8 hours - possibly deployed to your other planets so you're simply shifting resources around, and then all they will gain is your residual resources, which is still maddening, but better than nothing :)
and that will basically enable to you survive every attack ever.