You can say no all you want, but it doesn't matter when your "no" gets overridden by your manager's "yes". You can even quit over it, but there's a whole line of people waiting to replace you (yes, everyone, even you, is replaceable). Lazy developers have nothing on greedy managers.
What does there being others who will do a bad thing have to do with whether I do something bad or not? Is there an opportunity cost to refusing to enact or participate in criminal or immoral acts? Should I do something like that simply because I am potentially fungible?
I can't understand that logic.
Personally, I would and I have said no to work I find immoral. I was also fired, on the spot, for saying no to something that was illegal. The company then threatened to sue me. I threatened to sue them back and they backed down, and I found another job within days that paid more because, like most people in tech, I'm in demand. That company is now dead.