Maybe you could have a system where, in the extreme case, a fully automated company with just a few executives gets taxed on a fixed percentage of its revenue. For every human employee they hire, they can deduct 110% of that person’s total compensation (salary + benefits) from the revenue that’s subject to tax.
That way it’s beneficial in both directions: if they stay fully automated, they’re effectively helping to fund something like a UBI through higher taxes on their automation-driven profits. But they’re also strongly incentivized to hire humans anywhere it actually makes sense, because every real job they create directly reduces their tax burden.