This is largely an infrastructure problem, and it will be solved just as similar problems were solved with storage, network capacity, and computing power.
There will be bankruptcies, but the technology will prevail, just as the web did after the dot com bubble. Personally, I see the loss of craft and practical skill, which can only be built through doing, as a much greater danger. I still practise LeetCode from time to time so I do not lose the ability to write code myself.