Origin/meaning of "game of soldiers"?

I’ve run across the phrase “Bugger this for a game of soldiers!” a couple of times in Terry Pratchett novels and elsewhere but I have no idea where it comes from or what it means (beyond being a general expression of disgust or exasperation roughly equivalent to “Fuck it!”).

I suppose it is is idling. In Brit-speak of the 1800s, “soldiering” means “wasting time.”

In general, I think it refers to a situation that has stopped being fun or amusing. The sources I’ve read equate it to “playing soldiers = fun, being a soldier /= fun.”

Brit here. I’ve used the expression all my life. It means, Sod this, I’m not doing this any more, it’s too difficult/unpleasant/etc

I’ve always thought of it as “this is the equivalent of playing a kid’s game when I could be doing something adult” i.e. “this is a waste of my time”

I first grew familiar with the phrase while serving in the British Army in the 60s and I think it’s a safe bet that’s where it originated.

Example. We’re out doing a forced march over rough terrain at the crack of dawn in the pissing rain. “Sod this for a game of soldiers!”, someone complains. In other words, it’s a joke, I don’t want to play soldiers any more, I’m going home now.

Here is another punt at ascertaining the origin.

The explanation lacks authority in my book and the main reason I wave in its general direction is the reference to a hitherto unknown scion of the hagiological universe viz. St Fagos (Sod This For A Game Of Soldiers).

Anyone more saintly than myself ever come across this acronym?