RTA headers [1] tell the client the URL may contain adult content or user generated content which can be adult in nature and then the client can detect the header and prompt for a local password if parental controls are enabled. A simple law to require client applications to look for the header and triggering parental controls would handle this in an anonymous manor. Not perfect, nothing is, but would address much more than 70% of use cases for actual small children. Small children would be restricted to whatever browsing agents are installed as they do not have administrative permissions. If this was done in error the parent can reset the device.
Teens will bypass any method anyone can think of as current centralized methods do not even apply to most of their current methods of downloading and sharing porn.
[1] - https://www.rtalabel.org/index.php?content=howtofaq#single