Fleet A = high attack fleet: medium hulls, 24 hp each, 7 x Photonic Torpedo II, 28 attack, 0 defense, cost = 465, maint. = 13
Fleet D = high defense fleet: medium hulls, 24 hp each, 4 x Photonic Torpedo II, 7 x PD Combo II, 16 attack, 21 defense, cost = 790, maint. = 23
I don't think that anyone has claimed that defense is useful in a situation like this. I've specifically said that defense is useful IF you can make a ship that has defense equal to 1/2 the enemy fleet's attack or more.
But, to use this example, pit one ship A against one ship D. Ship D will win, and it will likely have full hp (because this battle fits my IF condition).
Or how about a fleet of two ship As against one ship D. The A fleet will do about 7 damage or more every round (there's a big margin of error on that number). Ship D will do about 8 damage every round. It's a very close battle, because after one ship A dies, ship D will take no more damage.
But ship D isn't really a good design for a defense ship. As you add more defense, defense becomes MUCH more powerful. From the stats of ship A and D, it appears that 3 photonic torpedoes take up the same amount of space as 7 PD combos. I'd prefer a ship D2 that has 1 torpedo and 14 PD combos, for stats of 4 attack and 41 defense. One ship D2 will probably win against a fleet of 3 ship As, because it's 41 defense against 78 attack. Again, it's a close fight, but pretty good for one ship versus three.
I'm not arguing that defense is overpowered or that it's always useful. Using defense is bad in some situations for example, it's hopeless against the ultimate fleet in Wyndstar's screenshot. Bit it's very powerful when you can do ShipDefense >= FleetAttack/2, which happens when your hull size and defense are better than your enemy's weapons and logistics.
As a formula defense >= attack/2 sounds OK at first glance, but you can't just ignore the cost of it. If defense was free, who would argue against it? Nor does it in any way guarantee you victory, especially if your attack values are very low. You should also remember that as attack values go up the formula starts to break down. In the long run, you will need more and more defense as insurance against lucky rolls by an attacker. I know we are discussing average rolls and the law of averages here, but in this case the randomness itself is statistically significant and using nothing but average numbers can lead to false conclusions. That is because if on any roll defense rolls lower than attack, then damgage is done. These lucky rolls are a statistical certainty, and the more rolls, the more of them we will see. The average damage for 1 attack against 500 defense is still greater than zero. Unfortunately for defense, the defender doesn't get anything for his lucky rolls except to live longer, which you are assuming anyway.
Your assumption that in a one on one battle ship D takes no damage isn't quite true. It will take an average of about 1 hp per round, but you are correct that the odds are probably 10:1 in favor of ship D. But then it costs about 70% more and if I had an all attack ship that was worth as much, I could expect the same result. According to my calculations, two A vs. one D is a likely win for A, since I calculate about 11 damage per round inflicted by two of ship A. In fact, A should win more often than not without losing a ship, but if it loses one, it stands a very good chance of losing both. There is some interesting granularity there, but the numbers aren't in defense's favor because the cost is so much higher for ship D. If it kills both A's one time in three, that doesn't make up for losing the other two.
I get an even worse result for three A's against one of your 4/42 D2 ships. According to my spreadsheet, the three A's will do about 7 hp damage per round and the battle will most likely end without loss for A. Three A's against two D2's will probably result in the loss of one A. If that sounds like too much, remember that D2 has 21 chances to roll something less than A's average damage of 2 in every round. The chances of that happening on the first roll when defense is at its maximum is still somewhere between 5%-10%. Toward the end of the round, the chances will normally be better than even for each successive roll for A to get some damage. If D2 rolled the max possible every time and A rolled its average, D2 would barely squeak by on the last roll to avoid damage. If at any point A rolls 4 and D2 rolls 0, then D2 takes 4 hp damage, and no amount of perfect rolls thereafter will bring them back. That was the whole point of the first paragraph. Defense will never be entireley successsful at deflecting damage.