Please be aware of the Forum Rules of Conduct.
That's a ton of extra coding, you realize, on top of all the coding he's already doing.
I think I'd prefer the game focusing on small "units" of peasants resisting individual looting actions (a father defending his home and family as foreigners raid it, perhaps killing a soldier or two), rather than spawning large armies of peasants that'll fight on the battlefield. More realistic and seems better for gameplay.
That's already in the game. You can lose men when looting.
In my almost 10 years in the game I've only had that happen once or twice, though. The risk seems almost comically small.