We don't have a war on pedophilia. We have a war on "child pornography". I put "child pornography" in scare quotes because it's abundantly clear that many of the laws that aim to target child pornography really only use it as a bogeyman to obscure some other agenda.
Also, as for "safer", whatever we're doing now is clearly putting children at risk. In many countries (including the US), pedophilia is exempt from typical confidentiality laws regarding mental illnesses[0]. This makes pedophiles less likely to seek professional help, and I can only imagine that this means that they are more likely to harm or abuse a child.
[0] https://medium.com/matter/youre-16-youre-a-pedophile-you-don...