The problem with your line of reasoning is that the NYPD didn't see these guys as "bad apples" because they didn't look very hard.
Oh, they will tell you that they have internal investigators and such, but for the most part they simple know not to look very hard for corruption because if they do they will find it.
Having to make big payouts to the very few defendants who can come up with absolute proof of innocence sends a message to the brass that they should look harder for the bad ones.
So what's a police department supposed to do? Daily drug/alcohol screening? Daily polygraph exams? Apart from the usual steps how far is the department required to go to ensure that none of their officers are even guilty of jaywalking or littering?