Common dangers to your career and wages are:
1. Outsourcing
2. Automation
3. Disruptive innovation
4. Boom and bust economic cycles
Ways to protect your career and wages are:
1. Merit and Knowledge
2. Restricted professions & credentials
3. Union or government position
Not all dangers are avoidable, for example disruptive innovation is all but unavoidable, but boom and bust cycles are easier to survive in a bigger industry.
Not all way to protect career are available to everyone, for example merit and knowledge is unobtainable goal for significant portion of population (merit, by definition, it is zero-sum game). Additionally some have drawbacks - proximity to government or union usually has negative effect on one's maximum earning potential.
Now for more practical advice - a technical profession that interfaces with government, requires accreditation, and deals with local or critical infrastructure would be most stable long-term position. Civil engineer, food inspector, dentist are some typical example.