Woundings in battle is not always random. The agressiveness level of your troops and of your enemies troops will affect it. I've never been wounded when on rearguard/defensive.
Also, the retreat % affects your chances. You're more likely to be wounded when your entire unit is wiped out, than when you still have 30 men left.