Heres an idea:
Create a possibility of fleeing a battle based on speed. The base evasiveness chance would depend on the size of the ship, with smaller sizes having higher base chaces. Then this chance would be greater with better speed of course. If a ship has worse or equal speed, there is no escape. For example, sp. 4 vs sp. 6 = 50% the base chance. Sp. 8 vs sp. 6 =
-20% where escape is impossible. Sp. 6 vs sp. 15 = 150% the base chance of flight. This would not mean that escape is assured, but it is very likely.
Against an unarmed vessal, chance is calculated per round until HP is out. Against a vessal with only defenses, this chance is calculated every round until it flees or dies. Against a fully armed vessal, this chance is still calculated, but the player is given the option of fleeing or continuing the battle.
To go with this, ships with only defenses should not have a maintainence cost because they cannot attack. This will also be especially useful for freighters, because they will actually have a use for engines. There could be an 'evasiveness' race ability that increases this chance, and military starbases might be able to affect it as well.
I dont know if this is a good idea let alone modable. All feedback is appreciated.