I've been pondering (I'm trying to kick the habit
) over this auto-retreat idea, and would like put forward a suggestion if I might.
How about instead of having a mechanism in place that only allows a unit to retreat, we could instead have two, with the second being a withdraw option available for marshals (and vice-marshals when applicable) and which they can use either to attempt avoid battle, ie after perhaps receiving a scout report showing the enemy heading mob handed towards the region their busily raiding, or else simply after accomplishing the goal they were there for.
I know it would require either a marshal or vice-marshal to be in the region, but heck if a realm can't at least arrange that then surly it's their fault when they suffer the consequences.
I also think it would enable things be handled, and dealt with, as totally different situations, penalty wise ect, as while a retreat would be troops in a near panic stricken headlong rush, and with perhaps no option give them orders until next turn, a withdrawal could be seen as a rather orderly, if somewhat overly hasty, legging it.