I genuinely have no idea how that transition would happen.
And I agree that it would pose many unforeseen challenges.
This is why the transition is the interesting part, not the sci-fi end game with a world populated with billions of robots doing everything.