You can draw parallels to the people who worked for the Gestapo in Nazi Germany. Was it unethical to follow orders to round up Jews and others for near certain death, if you knew you would be severely punished if you disobeyed? At the same time you know that if you refuse, the next guy won't. So why fall on your own sword?
I think a lot of people flippantly say they would refuse the order, but it's easy to say that when it's not your neck on the line.
Truly a deep moral dilemma.