This "think of the children" rhetoric targets encryption, anonimity, decentralized platforms, and private communication channels like messaging apps, VPNs, Tor, etc. It is nasty. Keep in mind that it does not actually prevent child exploitation and grooming. Most of the pedophiles are on Discord and Roblox anyways.
In any case, there are ways to prove someone is over 18 without revealing identity, but that is not that goal, is it? There are cryptographic schemes just for that, such as zk-SNARK, etc. ZKPs in general.