Was there ever an army without the mentioned phenomen?
At what point did it become unacceptable in Western armies?
The idea of military discipline dates back to antiquity, with Roman Centurions and Optios often be upheld as examples of draconian troop treatment. However, for the purpose of answering this question I am going to focus on the "modern" army, a phenomenon usually identified as being applicable at the end of the 17th and dawn of the 18th century. I am also going to focused primarily on the British army and the degrees of unacceptability therein, but I am open to criticism and feedback from others if they want to join in!
Towards the end of the 18th century, and the beginning of the 19th century we see the emergence of an anti-corporal punishment movement within the British armed forces. EP Thompson is alleged to have described flogging as, next to the press gang, one of the most hated institutions of Old England. And it was commonplace. My archival research has shown deserters, people going AWOL, drunks and more getting hundreds of lashes. As Dinwiddy describes, there was no official limit on the number of lashes issued.
So when, if ever, did people start speaking out about this?
As far as I can gather from my readings and research, the first example can be seen in the Kilmainham papers (a collection of Irish military papers found in the titular Gaol). They show one Lt. Col. Morofall of the 50th regiment of foot complaining that several of his soldiers are being unfairly lashed, and that there is no rhyme or reason to their sentencing. In discussion of one Recruit Polfoy, of his own regiment:
“I beg leave to mention that Polfoy was a recruit when he deserted, and had never joined the regt. And it having been represented to the court that he went off from fear of being imprisoned on account of his having got a girl with child.” Jan, 1789 pp. 45-52
Morofall is explaining that Polfoy should receive a more lenient sentence for his crimes, given the circumstances of him getting a girl pregnant. He then goes on to critique the whole institution of flogging, in a manner which I do not want to get in to as it forms part of my PhD and is as of yet unpublished. But, to summarise, he believes that some soldiers are being flogged for the sake of it and there needs to be a reduction in the use of beatings as a disciplinary tool. He then cites several soldiers and the ridiculous sentences they receive from their drill officers.
David Collins, 5th Dragoon Guards pleads not guilty. – Desertion proved and called for a character, which was not favourable. 1000 lashes
Nowlan, same reg. 800 lashes but he pleaded guilty of desertion
Mcgee of the 16th reg pleaded guilty. 1,200 lashes
Powell, 16th reg pleaded guilty and received good character. 800 lashes pp.47-8 (I have paraphrased these, as military paperwork takes a while to get to the point)
Despite the efforts of Morofall and others described in the journal article listed below, flogging reached an all-time high in the Napoleonic Wars, but slowly became less common as the 19th century wore on. But the seeds of this revision of military discipline stems from the 18th century, so it started to become "unacceptable" then!
I hope this helped answer your question, I can field any follow-ups as best I can!
J. R. Dinwiddy 'The Early Nineteenth-Century Campaign against Flogging in the Army' The English Historical Review, Vol. 97, No. 383 (Apr., 1982), pp. 308-331
State Papers 63, PRO Belfast
Kilmainham Papers, MS 1110, National Library of Ireland