The fact is, the guy can be guilty but the tactics used to expose him can still be denounced as inappropriate. See McCarthyism in the 50s for an example. The Communists ferreted out by McCarthy may have indeed been Communists but most people think the tactics he used to find them (naming names, blacklists, loyalty oaths, etc) were deplorable.
So we just have to let the perverts run wild in order to preserve our freedoms?
I guess I don’t see much of an analogy between McCarthyism and police undercover sting operations targeting solicitation of lewd behavior in a public restroom.