I was never really concerned about the ethics, but was more worried that I'd be personally liable for it. I kept thinking about the VW emissions scandal, where the engineer that implemented it was given prison time.
In hindsight, it was probably a stupid thing for me to worry about. I also never should have expected that I'd be able to change the director's mind by refusing to do what he said.
Getting soft-fired really shook me, and it was a hit to my self-confidence. I did learn some valuable life-lessons from it though, and including that nobody should ignore office politics.
Afterwards, I found a job that was a much better fit. That next job changed the direction of my career, and I'm very happy with where I am now.