The problem is this a preposterous example, but let’s say we’re targeting kleptomaniacs. Is it immoral to target them, despite their propensity? I don’t see how.
Asking if it is right to judge people based on their mental health is an entirely different topic than asking if we can judge people based on a physical characteristic they were born with and have no control over. Apples and oranges.