Am I missing something, or are fleet battles a massive clusterfuck you can't really control? As in, neither the interface nor the available commands allow proper management of your fleet.
If you are trying to micro your fleet, then ya it can seem that way at first, especially before you get a bunch of command upgrades.
However, if you want a nice organized line of battle, then I suggest making
liberal use of the escort command-- by designating only one ship to search and destroy and nesting your escorts like so:
frigate -> destroyer -> capital ship <- destroyer <frigate
*very roughly, obviously you can have a lot of nuance and fleet design than that.
You will find that for the most part (depending on a number of factors) your fleet will tend to sort itself out. Be aware that this usually slows battles down significantly as it essentially begins a long phase of maneuver warfare.
This in and of itself is already a pretty defensive battle plan, to go more aggressive you could have several separate sizable squadrons each operating on their own, however you can get even more defensive by not having any ship set to a search and destroy or engage order. For example:
carrier x
x carrier
carrier x
where each carrier is escorting the next--then you daisy chain as many escorts to each carrier as possibly and you'll be left with a circular fleet cluster which will try to keep its space and engage opportunistically.