On the flip side, being "irreplaceable" isn't necessarily a good thing either because it generally means you are needed for one specific task that will stagnate your professional growth.
Nobody is invaluable at a company. Period. And especially in the tech industry. Code is just code. It doesn't take a magical power to read it.