

The thing You don’t seem to understand is that rapists committed rape and need to be punished. Pedophilia is a disorder that if it’s manifesting in a person may never have any impact on another person. Why? Because there are different ways it can affect somebody with the disorder. For some it might be a emotional thing, completely isolated from the world. For some it might just be a though of realizing that they are attracted to a person that is too young.
ACTING on these impulses is the problem. And that becomes way more likely when people don’t realize their pedophilic tendencies because they surpress any reflected thoughts since it’s a taboo to even consider that this disorder exists. And seeking help is even harder for the same reasons. So yes, Public shaming of EVERYONE that has this disorder is definitely not a smart move. Shaming and punishing people that act on it: yes please.

Innocent until proven guilty also apply to though crime.
You might want to separate people that are a potential hazard but that sets a dangerous precedent.
Also: somebody that might be easily angered and might hit somebody in a bar when drunk should be locked away preemptively?