Let's say Person A builds Widget X, and needs Input 1 to produce a Widget X. Person B builds Widget Y and needs Input 2 to produce Widget Y.
Person A uses their capital from their job to purchase Input 1 and produces Widget X. Person B uses their capital Input 2 and produces Y. Person A and B trade widgets and are happy.
But now, as before, automation takes the jobs of Person A and Person B. They lose their jobs, but retain their desire for the opposite widget.
Person A no longer has the resources to acquire Input 1, and Person B can no longer acquire Input 2. Neither X nor Y get produced, and both have their needs but are unsatisfied.
There is no guarantee that new automation will continue to fulfill all the desires that were fulfilled previously.
I mean, sure this arrangement can happen. But why would it? Why would person A want to trade with person B when they can get their goods made by a robot cheaper and better?
Now, I'm talking about typical desires as they stand now. Obviously you can have people creating increasingly exotic and bizarre desires to the point where it's impossible to satiate them all ("I want to own Antarctica"). It's also possible to hit resources limits, but that's a separate problem from "running out of work because of automation."
Consider a case where person A builds widget X, and person B builds widget Y, and they trade with each other. Automation takes over, they lose their jobs. If they continue getting the widgets they used to trade for (which are now created automatically), they simply have the same wealth as before but more time. If they don't have the widgets, they're now detached from the new automated widgets both in production and consumption. There's no reason they couldn't carry on the same work as before and continue to trade with each other. This might require societal and political will (they might need some sort of support to reach their previous arrangement), but if the desire for their old work is there and not being met, then there is work to be done.