(In America, I can't speak for other countries) there is a really interesting history about policing. What we think of as the police is a very modern invention.
This video does a really good job explaining it, but to tl;dr they were created for catching fugitive slaves. Crime hasn't increased over the years, we have only just created "new" crimes. Cough medicine used to be cannabis, heroin and meth all in one handy little bottle, but now any of those things can get you thrown in jail and ruin your life.
There is also a really long history of cop propaganda in the US (which
this video goes over pretty well, too). I'll admit it, I love SVU, but it's propaganda and it takes advantage of the ignorance of the law of the viewers. An individual doesn't choose to "press charges," for example, and the cops need a warrant in their hands before they kick in your door and arrest you, not hope the judge gets it signed by the time they take you to the precinct. The first 12 seasons Elliot broke laws, procedures, physically assaulted suspects etc, and people would always say "Oh Elliot you can't do that, desk duty for a week" but it was always framed as it was a just thing to do. Who's going to stand up for a pedophile when their teeth get knocked out? When the cops break the laws, it's because they
have to, they can't wait for a warrant, a child might die, someone else might get assaulted. In a recent episode someone was taking upskirt photos of women on the subway. He was black and was wearing a really specific outfit. He does this to the rookie female cop and she chases him, calling out his description on her radio (black male), so some cops in the station end up grabbing some random black man who's calmly walking and minding his own business, ignoring the black man who's very clearly running from something. Random citizens pull out their phones and yell "Police brutality! They're arresting an innocent black man!" and the entire story is "The police are trying their best! Don't be so judgmental!" It was so disgusting. This only happened in the story because the cop gave an intentionally vague description, because the cops forgot to use their brains and realize someone running is more suspicious than someone who isn't. In an episode where an innocent unarmed black man was shot and killed by the police, it was framed in the same way. The cops had no way of knowing he was not the suspect, a rookie was legitimately afraid and
had to empty his entire clip etc etc. Not everyone is media/genre-savy enough to realize that this is propaganda and is telling us that it's okay for the cops to break rules, since they're only doing it for our benefit. I can go on about the history of superheroes, especially Batman, and the history of inept policing but this post is already getting really long.
People are still going to want to read/watch/consume police stories, people still want to see bad guys get caught, they still want to get into the mind of a serial killer and why they do what they do, but I think we should be mindful of how we portray things and do our due diligence. We need to be aware of
why there are certain policies, laws, norms, etc, what affects those have on people. We can't pretend that all cops are good cops, or that breaking rules is justified. The original "loose canon cops who don't play by the rules" did so because the police were "ineffective" and corrupt in general, that's why Gotham needed Batman. If anything, if your cop is breaking rules, they are doing so because they refuse to uphold unjust and discriminatory policies and laws. I think it would be much, much more interesting to see a cop trying to fix the system from the inside and take down bad guys, no matter who they are or the uniform they wear, because they honestly believe in the spirit, and not necessarily the letter, of the law.