And a part of their role will morph into prompting GPT4 (much like this senior engineer has started doing).
If GPTx ends up in the narrow area where it's universally smarter than junior engs but definitely not capable of being a senior eng, then junior engs will just shift to the little remaining work for senior engs, shadow them for months to years like an apprenticeship.
Of course in that case the total number of eng needed will also decrease (already only a small percent ever get good enough to be considered truly senior), so there will be selection bias toward more intelligent engineers who are a step above GPTx. If none are left, then the profession will be gone and there will be no problem.