If you give your fleet a single order to attack a specific lightning turret, then they will kill all of the lightning turrets before then killing all the remaining turrets, before then killing whatever else is there. So hopefully that will help with that one case.
The targeting is quite intelligent, actually, but it's not psychic and what you are describing is not something that I think is even really logically possible -- why would ships prioritize shooting tractor beams, which do them no harm? They don't have any way to know you are planning to run away with them. Rather, they all prioritize (generally) doing as much damage to all the various enemy ships as possible, so that they kill as much of the enemy as fast as possible.
Targeting for self-preservation purposes actually doesn't make any sense, either, in a mixed-arms fleet because if ship A fires at the things that do the most damage to it, rather than what it can do the most damage to, then you wind up with your total damage output dropping. Assuming that your fleet is properly composed of ships that can all do a lot of damage to all the various targets, then you'll wind up with them all "covering each other" rather than covering themselves, if that makes sense.
So basically, the targeting assumes that you've got mixed fleets that are somewhat appropriately composed based on what they will be facing; if you stray too far from that you can still win, but it then requires micro to do very well with (unless you just brute force it with way more ships than the enemy has).
Hope that makes sense!