Things must just be a lot different in my area than they are in yours. Around here a cop will almost never ticket or arrest another cop, nor will they mess with judges or prosecutors either, not for small stuff anyway. Obviously things might very well be different for serious crimes, but for the small stuff these people all protect one another.
We had our share of problem children, but overall, my agency was clean. Most of the defense attys were good folks that played it straight as long as you were straight with them, and didn’t make chippy arrests or write BS reports. Most of the prosecutors(deputies actually)were new out of law school and as a result, were woefully inept. Some of the judges were good, some terrible.
Prosecutors, when caught, always trotted out the “We are on the same team” crap. That didn’t fly with me, and I made sure that it didn’t fly with my subordinates, later on.