That's what autocombat is tho. It calculates expected losses and skips the battle. Also triggers necromancy etc.
As mentioned, I think I'll make it automatically offer that as an option in the "units flee before your army" window.
Huh. I thought it was something completely different. My bad. There was no tooltip or tutorial about this so I didn't get that.