It also undermines your leverage if you want to bargain with the company over things like a raise in salary. You also have less protection against malicious actions from your work.
Personally, I don’t worry about being replaced. It can happen, but I don’t believe it’s helpful to be stressed about it. The way I prepare for it is to try to learn new stuff all the time and keeping in touch with people in the same field.
Which means you need to find a new employer. There are companies and/or managers out there that don’t have these misalign incentives, encourage best practices (like those in this blog post), and provide psychological safety. They exist.
Exactly. If you increase team productivity and your boss fires you for it instead of promoting you, then the company is doomed so why would you want to work for them?
Quite often the high cost of firing someone is exactly the reason why the company wants to fire them. If you're someone who doesn't do things the way the company would like that isn't leverage; that's a reason to push you out.
It deeply undermines your leverage if they want to fire you also.