At the school where I used to work, they did not allow phones in class. At the beginning of each day, the students would place their phones in a specially marked bin and they retrieved them at the end of the school day. Part of the parents signing of school stuff at the beginning of each year was an explanation of those rules. There was no reason for anyone to be surprised that this was the rule. (Not that this stopped a certain few each year from whining about not being able to check on their kids every ten seconds.) If you were caught with an active phone on your person during school hours, you were marched to the office and made to turn it in, not to mention a mark on the ole record. If you were caught a second time... three day vacation. And so on. The bottom line is that they are there for school, not to create social media content.
Of course, this is probably rescinded now. But it can be done, as long as the school can handle the constant whining from those few helicopter parents who cannot give up their control and those who are programmed to complain about everything because they enjoy doing it. Bah, modern education is just a game of 'who can recite the most' anyway. One would be better served by learning on their own these days.