Just like the guys with guns who rounded up the Jews and loaded them onto trains: just following orders/enforcing the laws.
It did not work as a defense then and it certainly does not work as a defense now.
Every police officer must question whether the order, or, indeed, law s/he is enforcing is indeed constitutional or if, by following it, they are actually breeching someone’s rights and infringing upon their inalienable freedoms.
If the law/order breeches someone’s human rights, yet the person still enforces it, in my never-humble-opinion, that person ought to face criminal charges. Society needs to be protected from small-minded apartchicks like cops who hassle law-abiding citizens.
But, increasingly, the militarized police forces see us as a hostile population to be controlled instead of citizens whom they are to protect. Thus, an empowered citizen, in their eyes, becomes an armed adversary to be ‘neutralized’.