Horrible Bosses is a movie that makes me laugh. I've seen it a few times, and I'd likely watch it again if I stumbled on it during a flight or while flipping channels. I've had some bad bosses, even one I'd consider a horrible boss. I've worked in poor conditions for IT, though considering what some people go through, it wasn't that bad. I"ve been stressed, overworked, and abused by employers. Again, relatively. These are really #firstworldproblems, and not so much problems as annoyances. I've really had an easy life compared to many people, though it hasn't always been stress-free.
The one thing that I've tried to do throughout my career is be a professional. Do the job I'm paid to do, and accept the good and bad. If I don't enjoy it, or don't agree with the demands, then I can leave and find another job. I've had to do that a few times, often because of the people that make the job a bad one. Fortunately I have a great boss now, which makes my work much more enjoyable.
I've also tried to build software that I feel comfortable with from a moral standpoint. I've never been asked to work on anything illegal, and I hope I never am. I'd also hope that I would refuse to do so. I think it's hard to put yourself in a tough situation, as you can never know all the variables. Imagine that you're in debt, you need your salary to pay for medical care for your family and it's a recession. You might feel trapped in a position, worried about not only losing your job, but also your livelihood and potentially putting someone's life at risk. Making moral stands in tough situations is hard, and I hope I never have to do so.
My best advice for my kids, and for others out there, is that you want to actively manage your career. I've told my son the best time to find the job you want is when you have a job, not when you are out of work and need a job. If you've got a horrible boss, start making steps to find a better one. It can take time, potentially months or years, so make a plan and start down the path of finding a dream job that you look forward to every day.