At my kid's middle school they're literally in the library.
Also, kids aren't dumb. They know how to follow rules once the expectations are in place. The idea is to leave the phones at home entirely, allowing them in the locker to accommodate for the edge cases is a concession that has tradeoffs for the child's parent.