>I can't find the exact quote but there is one that pretty much says when a peasant goes to war the best he can hope for is to come back to the same life whereas for the king it's a huge win.

The thing is, 'peasant armies' are largely a modern thing; Throughout history, arming your pesants without raising their station was... a little like giving slaves guns.[1] Most armies for most of history were composed of people who were higher class than peasants; for that matter, for much of history, your position in society was largely dependent on your ability to project force. (and that itself had a lot to do with wealth; a decent suit of armor was incredibly expensive for most of history. And fighting is something that it takes time to get good at like anything else; if you are a substanance farmer, even if you are equally armed, (which you won't be, a decent suit of armor was incredibly expensive) and equally big and strong (which you also won't be; having enough food matters a lot when strength training) you are gonna have a hell of a time fighting a guy who grew up wealthy who spent his time training.)

My understanding was that nearly all ancient and medieval societies had mechanisms for successful warriors to rise up the socioeconomic ladder; be that tournaments (some societies had rules where if you were able to overcome a better armed/armored opponent in the mele, you'd be able to keep some of his arms/armor) or in war (really, until the modern era, if you participated in the sack of a city, you got to keep some of the stuff your side stole. Certainly, in the medieval era, if you captured a rich dude in war, not only could you keep the stuff he had on him, you got to ransom him back to his family) - and of course, there are direct promotions; do well enough, and your leader is gonna make you a knight or something.

The idea is that if a society treated it's warriors poorly enough, they'd find, ah, 'Klingon promotions' on their hands; If they didn't align power with violence, they'd find themselves with new leaders.

(In a way, this is an amazing thing about modern democracies. The army, in many cases, remains subservient to the civilian state, even when it sure looks like it has a decisive choice in the matter... But, historically, this is the exception, not the rule.)

All that said, if you were poor, if you were sent to war, if you were used in battle, you probably wouldn't be armed/armored enough to be particularly effective, in part because your leaders would be just as afraid of you as of the enemy, in part because you were unlikely to be particularly effective against properly trained/armed/armored people, and in part just 'cause in the pre-industrial era, arms and armor were ridiculously expensive. (I mean, I guess you might compare a mounted knight to a modern MBT... the difference being that you were expected to go to war with your own stuff, not the government's stuff. Imagine a world where the only people who could be tankers were dudes who could afford to buy said tank... and a world where those guys expected said tank to pay for itself in booty.)

My understanding is that as a medieval peasant, wars happened to you. You didn't really go to war except in the most desperate actions. You were seen, really, as part of the land; almost property that turned fallow fields into productive farmland.

You could argue that the end of this system was Napoleon; I mean, it had been in decline for a while; more and more of the equipment used by armies was government property rather than private property, even to the point of the muskets being owned by the government rather than the soldiers, but... Napoleon decisively trounced the old system. You could argue this was a big part of why Napoleon conquered so much of the world; at a time when the rest of the world had an extremely class-based military leadership system, and where the men under arms were strictly limited, in part due to trust, Napoleon had an army (in part thanks to the preceding revolution) pretty much full of regular dudes, lead by officers largely promoted on merit. (Oh yeah, and because of this trust, Napoleon had a massive army)

You could look at the 'levee en mass' which gave France it's numerical superiority as enabled by the fact that the French trusted their poor in ways that the rest of the world didn't;

[1]which did happen; I mean, there are ancient sources suggesting that several bronze-age societies had elite units composed of slaves, even... but clearly these weren't your regular slaves; the status of being an elite soldier meant a lot more then than it does now. And throughout history, most of your army was a class above your laborers- It's hard to use force to make things shitty for the people who are applying said force for you.