In the case of fleet boats they usually never needed to run the 'engines' at flank to achieve maximum speed. They were diesel-electric and had somewhat more engine power than electric power. It's been a while since I've read that book, but I think O'Kane was pushing the engines to the limit to maintain maximum speed
and charge the batteries, something a U-boat cannot do because of its direct drive powerplant.
Thus, in the case of U-boats, max speed did require max engine power and anything used to charge the batteries took away from that speed. I do agree, though, that the engines should have a small chance to sustain damage over hours of running ahead flank. Furthermore, I think that when 'overcharging' the diesels, something I believe
is possible in real life, instead of the only penalty being mega fuel guzzling the fuel use should be realistically proportional to that increased output (maybe 10% more power and 20% higher fuel consumption?) and instead the chance of mechanical failure should be greatly increased.
Now, as for whether or not any of this is possible in the game... I dunno.