The clear answer is that one should never just be following orders and if your company is doing something that you personally feel uncomfortable with, you should try to stop it. And failing that, quit.
I completely agree that if you do not feel comfortable with the work you are doing, then you should stop. If you feel comfortable with it because you've compartmentalized, then I imagine you would not stop. And, unfortunately, there's often some reason to compartmentalize some situations: because your competitor will just as soon take the business.
It certainly would have been better if we could have gotten US policy on Nazi Germany to change much earlier than it did. It would have solved the coordination problem--for US companies, anyway. This would have required direct political action.
> Harry Truman, was quoted in the pages of New York Times in June 1941 as saying, “If we see that Germany is winning the war, we ought to help Russia; and if that Russia is winning, we ought to help Germany, and in that way let them kill as many as possible …”
> because your competitor will just as soon take the business.
So what? You might as well be a hitman because, if you're not, somebody else will. You're just leaving money on the table by not being a killer for hire.
Your own principles don't depend on what your competitors will do.
I stated that in the beginning and then moved on because the world is not black and white like the case of being a hitman (besides that is already solved politically). You are going to face situations that are ambiguous as I believe was the case for most Americans at the time of the IBM sales for the Nazi censuses.
That specific point was about the importance of using your political power to act as a group in a way that will actually affect the world, rather than solely appeasing your conscience/principles.
https://en.wikipedia.org/wiki/IBM_and_the_Holocaust
The clear answer is that one should never just be following orders and if your company is doing something that you personally feel uncomfortable with, you should try to stop it. And failing that, quit.