The question is, why? The Milgram and Stanford experiments showed that around 75% of people will do anything they are told, if they perceive those telling them to do so as authority figures, but that still does not answer everything. Authority alone is not enough: few Americans would covert to Islam if ISIS invaded the country, regardless of the costs of non-compliance. Admiral Yamamoto would not invade mainland US. There would be a rifle behind every blade of grass.
The only type of authority that could convince anyone to commit atrocities is one that is seen as legitimate. What is legitimate authority? It is authority that is consented to and seen to act in the interest of the majority supporting them. While many believe that only voting republics could be seen this way, few totalitarian powers were established against the will of their subjects.
Left Poster: The Mind And the Fist. Vote for frontsoldier Hitler! Right Poster: Fight Hunger and Despair! Vote Hitler!
They often turn against those who put them in power, but only after riding a wave of popular sentiment. This sentiment can either be genuine or deceived, but tyranny only happens when one group of sees the slavery of another group as necessary to the security of the state, and by extension their personal security. Alternatively, egalitarian tyrannies arise from the belief that everyone including those supporting it have to sacrifice for a greater good, usually equal economic outcomes.
The irony about collectivism is that it is supported only when there is personal gain to be had for its subjects. Financial security for one’s family usually, or more rarely, physical security (rarely because totalitarian regimes always purge their enablers once they are no longer useful). Those tasked with stomping on the serfs do so because it benefits them either financially (anyone who says they won't follow illegal orders: find the pay table of that person's rank and benefits), gets them a more politically secure position in the new order, or because they have been duped into believing that attacking one group benefits everyone, and by extension, themselves and their own families.
None of this changes the fact that those who follow orders bear equal or greater responsibility than those giving them.
Preventing this from happening should be the first priority.
Remind police and soldiers that terrorism and narcotics laws do not justify violating the very constitution they swore an oath to. The Bill of Rights has no exceptions, not even in war. This should be a grassroots effort, as any centralized group can become controlled opposition (the SAF and JFPO are good examples), or turn from fighting for your rights to profiting from the struggle (The NRA is a fine example). Show historical records of atrocities committed under orders and emphasize that every soldier and policeman chose to follow those orders. There is always a choice, even when others say there is not.
Attack the regime's legitimacy. This is the strategy leftist revolutionaries use. There is no moral-equivalency on this one: deconstructing a tyranny's legitimacy is always better than a shooting war (and worse, a civil war opens a nation to outside invaders, who could be far worse than the original regime). Deconstruct propaganda, ridicule propagandists, find ways to force the regime to drop its facade of civility.
Should all of that fail, then going after leaders could be the worst possible strategy. Authoritarian regimes build cults of personality around their leaders. Breaking the will of the rank and file to follow orders will have far greater effect, and it does not have to be violent; simply presenting a moral delimma they cannot ignore can work (a crowd wearing yellow stars will break a soldier's trance).
Most importantly, citizens should stop treating citizens as enemies. The real enemy are the corporatist global interests who are fanning the flames of group identities, with the aim of divide and conquer.