There are other jobs. And even if you're on unemployment, you're benefitting by the cost of food, clothing, cars, almost everything bought, being substantially lower due to automation.
Ridiculous example because there are lots of jobs that can't be done today or anytime soon, by machine. Healthcare, service industry jobs, designing/building the automation eqpt, etc.
You let the free market work it out. And before you say that isn't available to all, there are plenty of people who started a cup cake shop, a cleaning business, etc that are making way more than any of those factory workers ever did.