In the first place, the machines don’t yet exist that can do all of the tasks required. When that machine is developed – which is surely just a matter of time and focused innovation – then its limitations will be, as noted above, task switching and the ability to handle complex and unexpected variations in the task.
The first machines that might be workable will require a long phase-in period with a lot of oversight by both programmers and line workers to continue to work out the bugs, enhance the Artificial Intelligence (insert joke here) and the neural network that will be required to link several of these machines together, and to a (likely) human manager. There may even be an element of self-serve involved (such as with fuel stations that have self-serve gas pumps, ATMs that require you to do some of the cashier tasks that used to be done at a bank window, etc.). In fact, most soft drinks at most fast food joints that I’ve seen are already self-serve. Pay for the cup and fill up as you like, and the losses in extra product that this incurs are still cheaper than having an employee run the dispensing.
It’s not likely that you’ll walk into a McDonald’s someday and “all of a sudden” all of the people will be gone from behind the counter, but it’s a gradual and nearly inexorable process. I don’t see it as anything to be upset about, either. I like and appreciate human ingenuity, even when it’s slow and imperfect, but I already know that I’m in a tiny minority here.