this is very concerning, I'm actually encouraging my kids to physics (or chemistry, or biology, or math, i.e. STEM), as I feel so few kids are taking on those majors.
on the other hand, more and more are learning programming these days, I recall after 2008(or 2000) some CS departments lost nearly 50% enrollment because coding jobs were saturated then, that may happen again.
still, the "safe" way will be good at coding while specializing in some STEM fields(including chip design, which is mostly software tool usage these days). Wall street is another way out, but I don't like it and won't recommend it to kids.