I think it is worth exploring the difference between having distrust or even hatred of “all cops” versus having distrust or hatred of “all black people.” The two just aren’t equivalent.
Forming an opinion about someone based upon an immutable characteristic (such as race or sex) is wrong. The color of my skin is not something that I can control, and so it tell you nothing about my thoughts, beliefs, dreams, hopes, etc. Just knowing that I’m black doesn’t tell you anything about my character, my job, my education, or my morals. It only really tells you how resistant to sunburn I might be.
On the other hand, forming an opinion about me based upon the career I’ve chosen is quite reasonable. If you learn that I’m a trial lawyer you can probably conclude that I’m fine with public speaking. You can infer that I don’t mind arguments and will vocally voice my opinions. You can probably conclude that I have enough willingness to see things though to spend 4 years in college and then 3 more years in law school. You may also determine that I probably have a pretty high opinion of myself since the personality type needed to a be a lawyer would fit with that. You may also assume that I’m more arrogant and convinced of my own correctness than average (and honestly, you wouldn’t be wrong).
Applying that to occupations, it is completely fine to form an opinion of a person based upon their decision to become a cop, just as it is fine to form an opinion based upon my decision to become a lawyer.
The same is true for every profession really, and I think we already all do that. When it comes to firefighters, I love them so much that it might not even be rational. Same is true for doctors and nurses. On the flip side of that, if you learned that your new acquaintance spent the last 2 years working as a torturer for a cartel, I think you would reasonably draw some adverse opinions about them.
So, holding opinions about someone based upon an immutable characteristic such as their race or sex makes you a bigoted piece of human garbage. Forming opinions about someone based upon choices they make (such as what they do for a living) is entirely different.