There's a reason why there are more former prosecutors on the bench than former defense attorneys.
Judges don't make laws (well, at least, they aren't the ones I'm talking about with a jurisdiction-wide, state or federal, prohibition.)
Now, if you want to say that it's not easy to control because legislators and ultimately the electorate are biased toward and support this kind of police intimidation, that may be the case (though that's exactly saying it's not easy to solve because we, as a society, actively desire the status quo. It's easy to solve, it's hard to convince people it should be solved, which has always been the problem with civil liberties.)
The fact that they've pissed off the cops may or may not factor into it. Not saying you're wrong, just that it's not quite THAT simple.
There is an inherent conflict of interest in having the person responsible for investigating crimes be someone who needs to work closely with the people and organizations who allegedly committed the crimes.
I agree with you that if you have a different district/office handling this sort of stuff. But it always comes down to Who's Watching the Watchmen. Checks and balances are hard AF.