As a high school student, the second task is almost impossible unless you plan to homeschool your child and as well as completely restricting use of devices. Back when I was in my public school, my friends would have parents strict to an almost extreme extent and they still find themselves in a sinful lifestyle even though the parents had been trying g to prevent it.
Personally, I think children, by the time they become a little more mature should be given freedom in a sense that trust is involved. For example, my parents gave me less freedom when I had been a video game addict because they knew that if I cant control my video game use, they knew I couldn’t control temptations to well. Where as opposed to now when they see me praying the rosary everyday, biking to church on my own, serving our local parish often, and overall respecting them more and as well as my responsibility, they give me an almost limitless freedom per se because they trust me completely now.
I think if the parents can get their children to actually prove themselves worthy of said freedom, they should receive it. And this freedom I get give me experience in the world and this experience helps me stay strong as I reject what I know is wrong.