Ouch, 120 ships vs 40 ships and still lost, that just sad even for A.I. But take a look at it this way. If they made friendly A.I as smart as enemy A.I you would never need to control your fights again, you could just sit back and relax while your army of 20 mark lV missle ships (forget what there called) annhilate the enemies force of 300 troops, in no time just by kiting (with the aid of a couple tractor beams). Usally The A.I was made to be set very close to the wormholes when enemies do appear, so they don't go all crappy on you.
I also notice that the friendly A.I will use the forces on lone instead of in group, thus the faster but weaker units get to the enemies fleets and get destroyed and when the rest of your fleet arrives they are destroyed because of all the fighters distracting. The friendly a.i won't recongize certain ships were made to work together, because sometimes i have a fleet on stand-by(FRD) and when the enemies come the engineers are left comepletely alone.
PS: what about your turrets, that usally protects world pretty well, although i just put sniper turrets at the corner of the map and let them snipe everything that appears and sometimes they even get aggro