I think your take is too far. It’s just beyond reasonable.
If a teacher were outside the room and heard a loud crash, they’d go investigate. This is doing the same thing.
It isn’t identifying individuals, it doesn’t record any information about a person, it simply flags that somebody is breaking the rules and is worth taking a look.
This is about the least invasive technological solution you could get.
And it’s a heck of a lot better than alternatives like removing the stall doors.
It’s a separate but adjacent problem.
No school should ever be allowed to take the doors off bathroom stalls.
That just seems to be the alternative that don’t places are doing to deal with kids congregating in the bathroom to vape.