We can take care of those people who cannot sell their labor at above minimum wage. It's not a law of the universe that they need to be exiled to starvation or eviction. (American corporations would love to have you think so!) Of course, this means that if you own a big company like McDonalds and put all your workers out of a job by automating, you need to do your part to take care of them.
When jobs are automated, overall revenue doesn't go down. It often goes up. It's a misallocation that the increased revenue doesn't go to displaced workers in the form of welfare.
Groceries are already adapting: they employ fewer people than they did prior, especially in high-cost areas. They already are removing cheap labor: self checkout. The increase in productivity goes to the worker who still remains, in the form of a higher wage.