I have recent relevant experience in this regard. I'm working on a system for university-level language professors, a large part of which is making it easy for them to use videos for homework assignments. We recently had a meeting with one of the university's copyright lawyers to ensure that the video delivery system was sufficiently "safe", and they'd be legally protected from being sued for copyright violations when professors want to use films in their classes.
We quickly discovered that, if we explained things well enough that the copyright lawyer was capable of understanding how decrypted video ended up on the students' screens, and thus how a sufficiently tech-savvy student might possibly pirate it, they would freak out and insist we Do Something More. The obvious solution: stop explaining how things work, 'cause this is just making more work for ourselves. Tell them "other people used this thing and didn't get sued", and deflect all technical questions, on the other hand, and they leave us alone and let us work on something reasonable.
And so it should be. We're talking about a technological measure that is being implemented with the intent of preventing an actual crime. There is a real possibility in this case that undermining the measure will increase the amount of that type of crime that is committed. There is also little evidence that the measure is being abused by others on a significant scale with actual negative side effects for anyone.
Now, a developer might not want to implement that measure because they were concerned with other consequences that might not be in the public interest, or with the future potential for such consequences. This might be a perfectly reasonable position morally and/or technically, and as you say, that developer has the choice not to take that job. It's not as if good programmers are starving in the streets for lack of other opportunities, after all.
But if you do take a job as a programmer on a project, typically your authority and responsibility do not extend to setting the requirements and deciding on policies like this. If you presume to deliberately undermine those whose jobs do include making those decisions, you should be treated as a bad employee and dealt with accordingly, and that does include being fired, getting a professional reputation for being unreliable and not a team player, and so on.
Also, if you decide you don't want to try that hard on "anti-counterfeiting" protection, that's fine with me ;)
If you fuck up your goals, yup, you could be fired. Supply of programmers is much lower than demand, so I bet you'll find more work. Or you can retire and repair bicycles for a living. You'll do fine.
That's easier said than done, kudos to those that pull that off but there is this thing called code review and if your co-workers are halfway competent you'll get called on what you built. In some cases that can be a career limiting move.
Better to pick your employers so that you don't end up as an enabler of technology used against the public interest.
Of course if you're going to 'take one for the team' and purposefully gain employment somewhere for the sole reason of messing with the machine that's a laudable strategy but it will likely come at a price in the longer term.