This is great. Lots to think about.
We just might be going there. Canada has various social programs, designed to uplift those in poverty. I think it's working pretty good---and leading to the eventual UBI.
The allocation of the entitlements is based on the tax return. When "taxable income," is assessed, that number becomes the foundation for the calculation for the entitlements. A big software programs determines who gets the entitlement, how much, and sends it to the appropriate bank account. The civil servants seldom interfere with the software's decisions.
However, the software is not deciding the nature of the entitlement. That comes with the passage of a bill into law. Which takes real people. I'm not too sure we should turn that job to an AI.