@JEBell Not to judge but that sounds like a really time consuming approach, would you be better off doing a blanket block of social media and then allowing student phones?
Also how do you determine a device is a student phone and not a legit device?
What wifi vendor are you using?
If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.