I'm not that old. "Just ban phones" worked perfectly fine when I was in high school in 2010. "Just ban cigarettes" also worked, and no one was smoking in the classroom. It's not a hard problem; the administration just refuses to solve it.
The solutions are simple and effectively free. That's not the issue. The issue is nobody wants to do the solutions. Schools don't, parents don't, kids don't. Everyone is just lying to themselves.
You can't on one hand claim to care about kids and then on the other dismiss obvious tactics like banning cell phones.
up to a point the teacher's job is to notice these, and motivate the student to pay attention (report cards, detention, extra homework), or ask for them to be removed from class if they are disruptive, if necessary permanently.