How does the safety net work right now? Citizens get it, as do legal residents who have lived here for enough years to qualify. That's standard. I expect UBI to follow that.
As for the undocumented, no they don't get UBI, just like they don't get Social Security or Section 8 or TANF, etc. The fact they aren't on a register means they're not getting UBI because there's no record of them. If they want a UBI, they can get one from their own country where they hold citizenship rights.
As for criminals, as soon as your are not incarcerated, you get basic income. That's a very important element of UBI. As for during incarceration, that's up for debate. Because UBI is meant to cover needs like food and housing, should it go towards covering those costs to reduce the amount of taxes required to pay for the incarcerated? Or should their UBI just be paused while they are incarcerated so that taxes still need to pay for their incarceration? Or should their UBI get to build up while incarcerated so that they leave with a windfall amount? There's definitely a debate there to be had, but the fact there's a debate there does not make UBI poorly thought out, especially when it's far superior to our existing shitty system built on conditions.
As for your other questions, I suggest looking at Alaska which has the closest thing to UBI in the world. There's a lot to learn from there.
Additionally, if not UBI, what is your preferred solution to confronting the realities of the automation of human labor?