Police who break the law must be prosecuted like anyone else, promptly fired if guilty, and barred from ever working in law-enforcement again.
That’s the solution.
To add to that, they should require something akin to malpractice liability (like healthcare workers), so that they are financially ruined for fucking up.
To add to that, they should require something akin to malpractice liability (like healthcare workers), so that they are financially ruined for fucking up.