I think these things work in tightly knit societies where everyone more or less knows each other and these “criminal” behaviors were found to be universally unacceptable.
In a modern society with a high degree of anonymity the after effects of having to wear a mask would be minimal. Unless you have some kind of a formal “social credit” system. But even these it would only affect certain stratums.