I mean at some level, how can a cop be disqualified by having private racist thoughts? They're even likely to pick up such thoughts from the job itself.
But then how do you determine whether those thoughts influenced a specific action or not? This is the ultimate problem with all attempts to police thoughtcrime - you're effectively past the demarc point, with ambiguous enforcement that just ends up eroding respect for the rule of law ("haha Joe the idiot got written up by the racism inquisitor again").
You're essentially saying "we can't arrest our way out of the murder problem". The Scandinavian approach of rehabilitation does make a lot of sense - the sheer majority of murders are prevented via societal values. But the ultimate check is still that criminals are arrested and punished. This feedback loop has been broken for police themselves, which has allowed their culture to degrade into absolute shit.