Over the next few decades, we aren't likely to see AI taking over in a totally autonomous way. Instead, it's going to continue to be used as a more and more powerful tool for powerful humans to exert control over everyone else. Automation is, first and foremost, a mechanism for capital to gain at the expense of labor, by replacing finicky and expensive human labor with ever cheaper and more powerful robots. AI is also a powerful tool for social control, as the Chinese are rapidly learning, and such control mechanisms will appear here as well, employed by a mix of the government and private actors. During our lifetimes, it is much more likely to continue to evolve in a dystopian way rather than by bringing forth a post-scarcity utopia.
If automation does turn out to have a net negative effect on employment, and inequality reaches a high enough level that consumers cannot afford to consume enough to keep the system working, a UBI in some form will likely be enacted - not so much out of humanitarian concern as to provide the necessary level of redistribution to keep the economy growing. The amount of money that is redistributed will be just enough for technologically unemployed and underemployed people to be able to afford basic food and housing plus the requisite amount of iCrap to keep the tech giants going.
Even if political and business leaders turned benevolent all of a sudden and tried their hardest to bring forth a post-scarcity economy, there's a pretty fundamental problem in the way. Most people actually do need to work to feel valuable and needed, and would hate pursuing leisure and learning without having about 20-25 hours/week of work. This is actually mentioned in Brave New World, as the Controller is describing the history of their social system. It was discovered that people became less satisfied when work hours were reduced below about 4/workday; the state had to respond by creating unnecessary work to keep people happy.
I suspect the same is true in the real world, although most UBI trials so far have gotten abandoned midway through for no good reason, so it's hard to come up with any good conclusions. There may still be some information from recipients of welfare and disability benefits, versus people in similar situations who did not obtain them, although I haven't really plunged into the literature enough to draw any conclusions.
It is possible that our society's cultural preoccupation with work is responsible for a lot of the problem, but I can't imagine it's all of it - humans in every society have been under social obligations to spend a decent share of their time contributing to the group's welfare, although the nature of the obligations and time off from them have varied greatly between hunter-gatherer, pastoralist, agricultural, and industrial societies. I strongly suspect that most people do not respond well to having no obligations to provide for themselves and loved ones, and that it triggers a kind of existential despair that can only be partly covered up by electronic entertainment, drugs, gambling, sex, etc.