It may also be futile to try to have a meaningful concept and practice of professional ethics without professional autonomy.
The ABA and AMA take a lot of heat here on HN and other libertarian-leaning forums, and some of it is deserved, since they clearly do engage in cartel-like behavior.
However, it is important to remember that they have established a set of laws and practices that give the members of the profession the ability to resist unethical commands from "superiors". For example, generally speaking, a non-lawyer can't own a law firm. Same for physicians. A lawyer must be licensed to practice, and that right can be revoked. A lawyer isn't allowed to say "my boss made me do it", but at the same time, a lawyer can't have a non-lawyer boss, and that boss can't legally go hire someone who isn't a lawyer (and isn't bound by a code of ethics) to do it instead.
I want to be clear that I'm aware that in reality, it doesn't come close to working out this neatly. But the conceptual framework, at least, is there.
I do think programmers are in an untenable position, when they are stripped of any professional strength but called on to resist unethical demands of clients and bosses. And yeah, I do mean stripped, not just denied. A large section of the programming workforce is employed under visa conditions where their employer controls their right to live and work in the US, as well as their position in a very long queue for a green card application. So we aren't just ordinary workers with no special protections but no special liabilities either, we are often a workforce that is particularly vulnerable and unable to push back against the orders of people who aren't ethical and aren't part of our "profession".