In the US Army, smoking is a general term for physical punishment, although not necessarily collective punishment, as in your example.
A Wikipedia glossary of military slang has the following entry:
smoke (verb)
(U.S. Army)
Term to describe punishment of minor offenses by means of excessive physical training.
Usage: "The drill instructor smoked me for talking back."
See U.S. Marine Corps term Thrashed
This seems to be an interesting niche preservation of an otherwise obsolete sense of the verb smoke.
According to Merriam-Webster:
smoke verb
smoked; smoking
intransitive verb
...
2 archaic: to undergo punishment: cf suffer
...although note that in the archaic sense listed here, to smoke means to be punished rather than to punish.
Disciplining an entire unit, much as you describe in your example, can be termed a smoke session, as we can see in this excerpt from a US Army document entitled Corrective Training/Corrective Action Guide for Leaders:
Leaders must exercise good judgment in the administration of
corrective action. Corrective action may be applied to entire units if
appropriate (correcting an entire platoon failing to show teamwork
during Red Phase in a given training event by having them do five
repetitions of the pushup, for example), but will be focused at the
individual level whenever possible. Improper use can lead to
unauthorized mass punishment or hazing. Do not refer to this type of
administrative corrective measure as "smoking" or "smoke sessions;"
such references give the impression that these measures are punitive
or oppressive.
Urban Dictionary also has an entry for smoke session. Well, it has several. Here's the relevant one:
Smoke Session
A term originating in military recruit training, which refers to an intense physical training session, usually initiated as a form of punishment for minor infractions, where one or more individuals typically do rigorous physical activity until exhaustion and/or muscle failure.
Bro, it was a total smoke session last night after drill sergeant Wilson caught Roberts sleeping during fire watch!
Also, as mentioned in the glossary quoted above, thrashed (or perhaps thrash) is apparently a similar term in use in the US Marines:
Thrashed
(U.S. Marine Corps)
An extreme physical exercise routine ordered by DIs upon a recruit or Platoon for making a mistake which could last until complete
exhaustion. Puddles of sweat are often the end result.