This is like a mini parallel of the industrial revolution.
A lot of places starting with a large and unskilled workforce, getting into e.g. textile industry (which brings better RoI than farming). Then the automation arrives but it leaves a lot of people jobless (still being unskilled) while there's new jobs in maintaining the machinery etc.