About ten miles from where I sit, there's a sprawling Intel factory in Chandler, AZ that just received a $2 billion overhaul so it can continue to produce the latest Pentium chips. The US semiconductor industry is still competitive because this is much more of a capital-intensive industry than a labor-intensive industry. Semiconductor chips are designed by people but are 95% produced by machines. The machines cost the same amount of capital wherever they are used in the world. The industries that are moving to China are those with a lot of labor content. Unfortunately that includes high-skill jobs such as computer programming.
But engineering is not a dying occupation. My nephew just graduated with his MSEE from a top school in California and is going to work for Microsoft later this month. One thing to keep in mind is that employment in assembly-line manufacturing is declining everywhere in the world as engineers design smarter, more productive machines and more efficient production methods. Unemployment and declining manufacturing payrolls is a huge problem in China as well as in parts of the US. Machines are doing more and more of the work and this will continue. That's why the service economy has been growing much faster than the manufacturing economy for fifty years.
your nephew is lucky, not everyone is graduating from the top schools and going to work for MSFT. Across the board, engineering is in decline as a profession. Middle aged ones are being offshored, college bound kids are not entering the programs. I see nothing that will reverse this trend.