The courts help to prevent that. Most of the rules that law enforcement people resent, like the Miranda decision, resulted because of law enforcement misuse of authority. I worked in the days when you stopped any driver to check for intoxication. Don't do that now. There has to be reason for stopping, like crossing the center line or speeding.
Probable cause has to enter into the picture.
Then you didn't have blood tests and breathalyzers. We didn't take a whole lot of drunks off the road and didn't take driver's licenses or plates. It was the best we had at the time. The courts used to lean a bit more towards the officer than what they do now. Heaven help the officer who gets in trouble with the court.