I am going to pose a frame challenge here.
Your question oozes with highly biased judgement that favors yourself over anyone else, and there are several cases of needless emphatics.
They hired me as senior engineer, and my performance was excellent to say the least. I have saved the company lot of money, by bringing to life things they had given up on.
It's one thing to say your work was well reviewed by the company. It's another to label yourself "excellent to say the least". "saved the company lot of money, by bringing to life things they had given up on" sounds near-messianic.
Then you go on to describe the people you work with:
- The engineer in focus is beyond "unprofessional". I say "beyond" because you specifically point out that "calling him unprofessional would be an understatement"
- The CTO is "weak"
- The senior manager is "from the 80's"
- The manager is doing "weird" politics, like approaching people, talking to them, and being on the same side (???)
Gosh, it seems like everyone except you is incompetent.
I especially got a chuckle from your description of the senior manager:
And after all this tries to pretend as if he is doing a great job, and everyone should be grateful to him.
...because that is exactly how I interpret your description of yourself, and how you seem to expect people to respond to your input about developer X.
Clear bias leads to a lack of trust
I am not interested in arguing details with you about who said what. But I am very strongly inferring here that you are presenting a biased story where you've not particularly tried to remain objective or pragmatic, which in turn leads me to wonder how this narrative has been spun, and where the more objective origin lies.
It seems to me that you are adamant about your opinion on how a company should operate being the only correct one. This is clear from your descriptions of others. You state (alleged) fact, and every time implicitly rely on the "and this is not how you should do it" inference, as if there's one universally agreed upon way of doing things.
This approach of yours especially goes off the rails when describing the manager. Other than you subjectively labeling it as "weird", there is nothing in your list of his actions that even remotely argues that this manager is not performing their job.
Your interpretation of their alleged "mantra" is even by your own claims based on rumors and inference.
There is nothing substantive about any of the people you've described, even though you've gone to great lengths to paint them in a negative spotlight. This significantly backfires for you. Rather than prove just how much better you are, it shows you as a petty, vindictive and fiercely competitive employee, none of which are admirable traits.
Vagueness to avoid substance
He starts shouting at meeting, prevents me from sometimes doing my job and asking for unreasonable changes in the code.
It's an odd coincidence that I've had almost the exact same complaints levied against me from specific coworkers (in different workplaces I was detached to). Which allows me to put the spotlight on how vague and subjective these claims are. Using my personal example:
- The unreasonable changes? Using commonly agreed upon good practice development strategies that this developer refused to learn (concretely: writing tests and documentation, promoting loose coupling and encapsulation)
- Preventing them from doing their work? Well, these "useless" good practices eat up all the time they could spend on writing (bad practice) code and the dozens of bugs they need to fix (due to bad practice development)
- Shouting at meetings? Well, I refused to keep letting them devolve any meeting into arguing whether we should employ good practice for every meeting, no matter the topic of the meeting. I did not shout or lose my cool, but I did assertively shut down these constant distractions and cyclic discussions.
I'm not claiming my experience precisely matches your experience, but given the emphatic nature of your descriptions and your unwillingness to do things any way other than how you think they need to be done (as inferred by me), this example shows just how much vagueness there is in your concrete problems with this alleged "bad apple" on your team.
I am strongly convinced that your persistent vagueness about concrete problems (both about this developer and in your description of why all your managers are incompetent) is a conscious effort to twist the argument in your favor. The way you structure your arguments, leave conclusions up to implicit inference, and emphatically describe anything you disagree with as unfavorable makes it really hard to convince me otherwise.
The workplace is about communication, not just work
The goal of this answer is not to argue with you, but rather to help you overcome the obstacle in the workplace that you're faced with. I genuinely want to help you and make your work experience better. However, it seems like the obstacle is not what you think it is.
I'm not claiming that you're wrong about whatever the original disagreement (which you did not explain) was. I can't arbitrate on things you don't mention, but I want to make it clear that I'm not saying that I think you're wrong about literally everything.
What I am certain of, is that your attitude is at best selfishly biased and unfair towards your coworkers, and at worst it is downright toxic. Over all, this makes you the bad apple.
Think of it this way: how likely is it that you alone are more correct in assessing this developer and how they function within the company, when three people (CTO, senior manager, manager) all evaluate this developer completely differently?
I'm not saying it's impossible you're right, but I would expect some level of humility and a proper argumentation as to why you think the other three people are wrong. In this answer, you have only resorted to attacking their character with unsubstantiated judgmental descriptors. There is not a shred of substantive argument as to why these people's evaluation might be misguided.
Your biased-bordering-on-toxic attitude is likely at the root of why your input is being on this developer is being ignored.
Based on personal experience in many workplaces, often those with endemic issues (as a consultant, I am often detached to workplace that have gone awry to fix things), I suspect that what has happened here is that there has been a genuine but harmless disagreement, and that you've doubled down on your position several times since then, leading to this escalated scenario where you no longer present it as just a disagreement, but almost to being a conspiracy of an entire company filled with incompetent people who are all working together to exclude you.
If you genuinely feel that everyone is as incompetent as you say they are, they you're either going to have to learn to live with the incompetence, or find a new place to work. You're not going to be able to single-handedly run the place, no matter how right you may have been about the original issue.
However, if the problem is rooted in your attitude, at least the part that turned a harmless disagreement into an alleged "conspiracy of the incompetent", then this problem is going to repeat itself wherever you work. It's time to learn to trust in others, and have some humility about your own opinions.
I have plenty of opinions that are different from how my company operates, but I choose to not die on these hills. I do my job and provide input to the degree my input is desired. My personal opinions on how certain things should be done, I limit to either professional projects where I do get free reign or personal projects where I can do it my way.
And as much as you may think your opinions are better, most developers who I've talked to who did things their own way in personal projects sometimes do realize that their approach had a significant flaw that they had not yet spotted.
Humility is not weakness, it is strength.