In reality, it makes the punishment worse for the rule-keepers than the rule-breakers.
My DS is one of the former - along with many of his friends - who now know that they cannot have a phone to let us know at lunch-time (or even after school has finished, as they've extended the 'no phones at all on the premises' rule to include 45 minutes before and after the school day) that a club has been cancelled, or to check if we have ingredients in for cooking the next day, or to raise any other urgent concerns.
My same-aged DN, on the other hand, IS exactly one of the kinds of kids whose poor discipline and unwillingness to abide by rules has caused all of them to be tarred with the same brush and receive a blanket ban. She told me that she and her friends will now just learn how to be coy and go unseen, to avoid the teachers spotting them with their phones out - apparently, it's easy to get away with it... and in the unlikely event that they are caught, well, a few more detentions or bad behaviour points to add to all the rest won't make much difference to them anyway. Either way, the rule is 'not for them' and will be ignored.
By way of analogy, I liken it to the self-service checkouts at Morrisons, where if I'm buying stuff for work and need two different transactions, or even if I've picked up a free local paper near the door, I have to wait for an available assistant to come over, watch a half-minute video and then press the button to say that I'm not a thief. Meanwhile, the actual thieves just fill up their holdalls and calmly leave the store, going nowhere near the checkouts, completely unchallenged.