If you have a job, especially if you have a good job, that pays a decent wage, the odds are that it's only a matter of time before your employer outsources, automates, or finds a way to do the work that you do more cheaply. And when they do, you're either going to take a pay cut or you're going to be out of work. The days of working in the same job for 30 years, getting a nice watch every decade, and a retirement party at the end are long over.
In a global economy, mediocrity is unsustainable. Companies must constantly be getting better -- faster, smarter, more profitable. Successful companies are perpetually searching for ways to cut costs and add efficiency, and that includes getting rid of expensive humans.
Given this, to survive in this world, most of us have two options:
The first option is to fight it. Stay below the radar and try to fit in. Make friends with your boss and delay the inevitable. Don't make a raucous, don't try to scale things. Stay quiet and stay out of the way. This is not a bad short term strategy. It will likely work for some amount of time. But in the long-term, the forces of profitability and efficiency are going to catch up with you and your average performance will be out the door.
The other option -- the much, much better option -- is to embrace this reality. Instead of fighting it, actually help your company outsource, automate or cheapen the things that you do. You should help make your job more scalable. There's nobody in a better position to identify which tasks can be done more cheaply and which tasks can't. Help your company identify those things that can be done more cost effectively and come up with ideas on how they can be done more efficiently and advocate for it. You don't want to be doing that kind of work anyway. You want to be doing the hard stuff that adds value. And this will allow you to spend more time on the stuff that your company needs.
And after you’ve scaled your current work, do it again. Keep cannibalizing your own job.
Of course, depending on the complexity of your job, it could take a long time to cannibalize yourself. In some cases it could take years.
Also, note that once you cannibalize yourself, you don't have to leave your company. Just the opposite. You should be thriving at your company and getting promoted, or at least spending more time on more valuable work (which you should be compensated for).
So in your job today, keep producing -- writing great code, building great products, closing big deals, etc., but while you’re at it make sure you’re aggressively looking for ways to scale -- before somebody else does.