You asked for opinion and here’s mine: leave the team or leave the company.
With the limited amount of info that you’re providing, it looks like you’re trying to fight a decision that upper management made. Not only you don’t like this person, but you crave his/her position. This won’t end well IMHO.
Specially, if you’re in a corporate environment, you’ll most likely achieve nothing and you may demoralize yourself further.