Intentional bad actors are pretty much a no go for me, personally. If you are calm and collected you can often outmaneuver them politically, but as you say there can be a personal cost. I have been successful in the past in these kinds of situations. Usually bad actors have one or two ways to back stab you and they don't have a lot of patience if those one or two ways fail. The will hurt themselves more than they hurt you in the long run -- I tend to think of it as giving people enough rope to hang themselves, if they so choose. However, there are also some really canny people who are just out to screw you. If you enjoy drama, I suppose it might be an interesting challenge. I really don't, so if I find myself in that situation, I usually leave.
Bad processes on the other hand are usually totally fixable. Learning the techniques to do that is super valuable. However, this is also kind of difficult because developing software is a lot more difficult than most of us believe. We really believe that we have the answer. Usually we are wrong. There are a lot of really passionate, caring people who bent on destroying their internal processes because the honestly believe they are going in the right direction. The most difficult thing to deal with is that we may be suffering from this delusion ourselves.
The most important thing, in my experience, is to get everyone marching in the same direction. Software development is a team activity -- processes that rely on a single developer, or an attitude of "protect us from the stupid people" will almost always be better of with getting rid of everyone except a single developer. But a mediocre team working well together will crush and single developer -- no matter how good they are.
With that in mind, you often have a situation were you have 5 people and they have 5 different directions in mind. Even assuming that one of them knows the right direction to go, if they all go off in their own direction you will fail. Having only one cross the finish line is failure -- they all have to cross the finish line. It's better to go together in any direction, even if it is wrong and then adjust course later. Trust me, it's hard enough trying to get people to work together at the same thing without having to convince them what the right thing is at the same time.
But to come full circle, this is where bad actors really throw a monkey wrench into the works. Almost always they have strong personal motivation to stick to one particular process (Could be complete delusion that there's is the "one true way", could be that they don't actually want people to succeed because it threatens their position, could be a million other things). If you can't arrange a situation where those people "self select" to not interfere, then it's probably not worth pursuing in my experience.