That’s why we have a government, to adapt society to an ever changing world. You can postulate as to _if_ government will step in an enact the requisite policies (UBI, Retraining, ect) but it doesn’t take a big imagination to see a world post-automation. There’s even a whole TV series set in such a world: Star Trek.