Physics and mathematics are other economic dead-ends.
If you want a steady career become an MD: plastic surgeon, cardiologist, anesthesiologist, perfusionist (doesn't necessarily require becoming an MD), or endocrinologist.
Most PhDs have a net negative lifetime earnings opportunity cost.
Biotech, data science, AI/ML are also good bets. What's not a safe bet is generic "programmer" likely to be automated out of a job and salaries are likely to crash when there's an oversupply of lower-skilled talent. Most programming will become trivial or eliminated by automation, as is already beginning to happen with AI code completion.