I agree but it's also better. On average for most programming tasks I think humans are as "defeated" as coders as we are as chess players.
The machines will not only be as good or better than you at the DB design, the business logic, the performance critical algorithms, the UX, the performance tweaks, the accessibility standards, security holes, browser compatibilities, laws and regulations and whatever else you need to make the whole solution.
It will also write user manuals in any language, and rewrite them when needed even on a friday evening. It absolutely will not stop, ever, until you are DE...wait, I mean DONE!
So the situation for coders is even worse than it was for the weavers. The machine delivers not only cheaper and faster, but also better. :-/
If the job involves mostly working on a computer, it will be probably gone in 10-20 years.
It's a catch-22 for the companies as well, since white collar work is presumably done because a company has customers, and most of their customers are white collar workers. At least in the US and Europe.
I don't think comparing it to the industrial revolution is appropriate, as the political and social conditions were completely different. I think you can compare the disruption that is introduced by artificial intelligence more with the deindustrialization of regions such as the Ruhrgebiet in Germany.