There's a gradient from a "work for food" world to "hunger-free" world. Until that transition is complete, people whose work is lost to automation lose their food.
That has not been the case historically. So far, when automation has removed jobs, better jobs have been added to the economy in the process. Among the poor in automation heavy economies obesity is a more common problem than starvation.