I love this story. Perfect example of how the reasonable tool can be used to achieve strategical advantage, contrary to its original purpose.
QRM for attackers is nothing wrong, IMHO, if you have to face inevitable failure, it is better to run away than fight.
Penalty for retreat seems reasonable, but 50% is too much, I'd say 25% tops. I agree with Phantom, that teleport should not be random - it should be made within certain range, in the direction of its nearest units (fief another faction member etc.
Another idea - what if the retreating forces were not be able to move at all after retreat for some time, like 12 -24h? Reasonably teleported and stalled, but still able to transfer troops/eq/gold to another unit?
One another - maybe retreat should be possible after closing the window for supplying defenders and attackers, but only for some time, like 2h. In such event the loss of troops would be lower. If you retreat during the battle, than the loss is heavy. Alternatively - every hour after supply window means, say, +5% of loss in the event of retreat before the battle. I like that one actually. That allows for using retreat for strategical reasons, but you have to pay for it - and it is your decision how much.