As a programmer, there are two main ways to make yourself irreplaceable. One is to write code that nobody else can possibly understand, so they can't figure out how to get rid of you. One is to write code so great that nobody could ever want to get rid of you.
The best way to be replaceable is to be somewhere in between.
ssh+2FA to all your machines, anywhere, without opening firewall ports.