I don't consider this a good precedent to the AI situation at all.
When this happened, humans went off and started doing what we now consider "knowledge work" (well, after a brief stint in factory work, where they also got displaced by automation). They escaped massive unemployment by being smarter than the tractors and mechanical looms. But how do they escape AI job loss when AI becomes smarter than the average human? or smarter than the smartest human?
In prior displacements humans moved up the stack. There is no longer room for them at higher levels of the stack if AI beats them at cognitive labor.
Humans keep a few around for entertainment but that’s about it.
The point is that people, like horses, can do other things. Humans don't even have to be better than robots at anything. It's the principle of comparative advantage.
...like what? If we start with the assumption that AI can broadly replace humans in knowledge jobs, what industries are absorbing tens of millions of humans for labor?
I see this as a categorical difference. The difference between AI and agricultural mechanization is that AI is highly heterogeneous. During the mechanization of agriculture that you talk about (which also happened over generations), there were alternative industries to move to. What happens when AI is competing in the majority of industries? Are there going to be 10 million new plumbers?