What can be done about police who are willing to help subvert democracy

If Trump steals the election in 2020 and there are riots in the streets police will be cracking peoples heads open the same day. Its the same in Hong Kong and Belarus where people are protesting to uphold democracy and human rights, so the police (who value order above all else) try to beat them into submission.

It seems to be a problem in rich developed nations as well as poorer developing nations. It doesn’t matter if people are rioting due to a football game or if they are rioting due to assaults on democracy, police treat them all the same.

So what can realistically be done to mandate police do not violently crack down when people are protesting for reasons like promotion of democracy and human rights?

Do any nations have systems that seem to work to ensure police treat riots due to things like sports or black friday shopping sprees differently than they treat riots due to promotion of human rights and democracy? If democracy is under assault, then the courts really can’t be relied upon to be neutral in judging whether the riot is ‘valid’ or not for example. Making the courts partisan is one of the steps involved in turning a democracy into a dictatorship.

Fire the policemen who like to hurt people, and hire people who want to be in the Peace Corps.

[emphasis added]

You seem here not to be distinguishing between rioting and protesting. Is that intentional?

Thought this might be a thread about Belarus. They are a stage ahead of America right now.

For England and Wales, you might want to start at page 12 of this parliamentary briefing