One time I took on a contract project that was really soul crushing. They were just re-inventing a worse version of something that already exists, so I didn't see the point. The code was a mess, and the team wasn't very good to be honest. It paid really well, but I hated every second of working on it, and I really struggled with motivation. They were happy with the results, but it wasn't my best work and I wasn't proud of it.
I really regret taking on that project, and I should have quit much sooner. It wasn't evil and it didn't have a negative effect on people. It was just boring and felt like a huge waste of time.
After that experience, I only accept jobs where I know I can do really good work, and where I'm at least a little bit interested in the idea. Even if I have to cut my rate, it's always better to feel useful and productive.