The truth of the matter is that school shootings are still much rarer than the daily use of phones in school. Talk to a current middle/high school teacher. They will tell you that in most classes there are at least some kids on their phone the entire time, and there is nothing they can do about it. And those kids distract the ones around them.
Kids get "emergency" texts from home midday, and it turns out to be stuff like "I put your socks away for you".
They can't take the phone away anymore because if they do, a parent comes in making the same argument you did, or they accuse the school of theft.
A statewide ban of phones during class time would at least give the local administration and district some air cover in these cases to confiscate phones that are being used during class.
No need to overdesign the architecture at this stage, but the requirements are pretty simple. Each user could be configured via school it adminstrator to allow video chat connections only to parent/gaurdian devices with the app installed.
Phones should be banned like Pokemon cards were banned. Bringing them to school is fine, using after class and even lunch is fine, but having them out in class gets them taken away and detention for repeat offenses.
the question may be serious but the "solution" (kids have a phone so they can call their parents before they get shot) is not
there are other ways to prevent school shootings, but because we have so many people in this country who like to play with guns we can't get it together enough to take the measures needed that would greatly reduce and perhaps totally eliminate school shootings (which are an almost uniquely American experience, and as a parent with kids in school, it's frankly terrifying and I couldn't give 2 f's about what the founding fathers wrote 250 years ago when the context and reasons for the 2A, which made sense at the time, have nothing to do with our modern era. It's like saying "well our illustrious all all-knowing founding fathers didn't find it necessary to ban slavery in the Constitution, and in fact, provided for it (3/5s etc.), so we should bow to their infinite wisdom and continue to allow it today."