no i am sorry i don’t agree: you are part of a chain, from the CEO of the company to the account / project manager to you and you are the final one.
Your responsibility is little to nothing as you just executed what were the requirements; the account manager was the one to say, hey it’s unethical, the project manager should have rise some concerns; that’s their job, that’s what they are paid to do; your job is to program .
this is the chain in a company; if you don’t agree with this you should go freelance, or run your own company or — once you realize what happened — just quit.
bu you should not be ashamed of yourself or of your code.
“the good will hunting monologue against nsa” argument is good til some extent.