When in charge of people at work, I never, ever engage in group punishment. I think only the evil and the stupid do that sort of behavior correction, whether they are talentless teachers or overbearing military commanders… or a manager at her wit’s end…. or anything on earth… there’s never a need for group punishment.
The choice stems from a libertarian-type philosophy that no innocent person should ever be annoyed or hindered due to the bad choices of others, if possible.
I also believe that innocent people should be protected from bad vibes. Therefore, I’d never verbally correct an errant worker in front of customers, either. I’d wait till privacy occurs.
In my decades of work, I’ve never found a needed exception to this.