A solution to these issues is for the child to not have the device in the first place. A desktop computer in a central place with eye on it can go a long way in managing online activities.
As a parent, as a former child, as someone that grew up with computers in places just like you describe, let me say, in my personal and professional experience… lol