I can answer that one. It's pretty simple.

Imagine you have a 100 person company right now. Everyone is averaging $50k (some are higher, some are lower, but that's the average), plus benefits.

Now, imagine everyone's job is automated away, except for the owner, and someone kept around to fix the robots.

Has the work being produced lowered any? No. Has the profit being generated lowered any? No.

So you have exactly the same financials you had before, now with 98 fewer people.

You also probably have some additional material costs for parts, but it's likely cheaper repairing/replacing robots than costs you had to cover for a human work force even aside from salary and benefits (workman's comp and various insurances, equipment, training costs as people left, hiring costs, etc), but let's just say it's comparable (even if you want to say it's not, we can reduce the payout to those people to take into effect the reduced rate of sickness and thus doc payments they'd have since they're not sharing office space, the less driving they're doing and thus reduced gas and wear and tear costs, etc. And that in turn means less payout to the government as less infrastructure investment to get people to their jobs at rush hour, etc, so taxes could also be lowered. Etc etc).

What about that ($50k times 98 = $4900k) that you were paying people before? It's still being earned. Just now by robots. Who don't need to be paid.

You lost 98 people, you still have all the money to pay 98 people, without dipping into the profits you'd have pre-robots, and without dipping into your and your employee's salaries. So let's assume that $4900k is split evenly amongst all involved. That means in this situation, everyone could be making $49k. The 98 you let go are being paid that. The one staying on is being paid that, even before his ~real~ salary kicks in. Same as you, the owner.

So everyone is being paid $49k as a basic living income, except for the worker and you, who are being paid that UBI of $49k plus whatever you were making before automation happened. You're living high on the hog, but you're also working; you have made the decision to trade your time for the extra money. The people let go, now, can choose to spend their time however they want, including -creating new businesses-, improving GDP, and their own ability to spend, while doing what they enjoy. There is incentive still to hold jobs, because while those making $49k can certainly live reasonably, those making more (let's say $99k, since the average before was $50k) have a lot more discretionary spending.

And that was managed by taxing -only- what would have been paid to those workers who were replaced; no 'new' expenses to the business (though with some assumptions, that the cost savings of using robots fully benefited the business). And that holds true regardless of whatever the market does; you only need to be paying the cost of what employing those people would have been. Getting from where we are, to there, is not as simple, because obviously we couldn't replace one person at a time and pay out a UBI from that to everyone (since the first person let go in the above scenario would mean everyone was making $500, which is not enough for the let go person to live on), but how it could actually work is quite easy to see.