Sounds like you got super unlucky and *all* the ships you're facing ended up with "timid" officers. The odds of getting a timid officer at all are very low (1 in 36 for pirates), and the odds of getting multiple in the same fleet are even lower.
Added an item for the todo list to look at it. Maybe something like "if all the ships on the field are non-combat or timid and they haven't managed to deal damage in X seconds, order a full retreat".
"Cautious" officers are a bit more likely to happen, but they won't consistently refuse to engage - they're just more, well, cautious about it. A "Safety Overrides" build might be a way to get around the issue entirely, for the time being, if it keeps happening to you. I'd be surprised if it does, though, as it's very unlikely. Unless you're playing with a mod and something was adjusted there that makes this happen more often?