Fewer, higher value employees has been the trend in many industries for the past few hundred thousand years.
You can, however, force people to lower their expectations until they can be trivially formalized. That's what happens with tea/coffee vending machines. The dispensed drink is really bad, but it's uniformly bad, and since people don't expect quality coffee from a vending machine, they don't complain.
The cashiers are gone. The fry cook is gone. The drive-thru order taker is gone. The cooks are gone.
You'll still have a preparer that will probably also do running (they'll bag the multiple, separate items up and take them to the front). You'll have a shift manager that will help with a bit of everything (eg if a customer has a problem with the order kiosk or payment). You'll still have a human cleaning the building and parking lot, taking out trash. There will also obviously be people routinely involved in machine maintenance, installation, etc.
There will be some complication with condiments and food layering. There will probably be a position for food ammo reloader, that keeps the machines loaded with whatever that machine cooks / prepares.
It would be possible to get rid of the bagger/runner, but it'd probably be cost prohibitive and needlessly complex to assemble the various robots on a line that could also bag properly.
At its best, eventually, this system will produce more food (1.5x to 4x I'd guess), at a lower per customer cost, with superior food safety (including hygiene). Then it's a question of how much of that gain gets competed away (benefiting customers) and how much goes into the pocket of the owners.
Starbucks will be similar. They won't get rid of all their humans, they'll reduce their number significantly.
It's likely to be a decades long, piece by piece, transition. The early results won't be spectacular for either customers or franchise owners, it'll take many years of gradual improvement.
A robot just does what it's told.
Starbucks used to have manual machines and the results were...variable. Some days you'd get a substandard drink, but if you got someone who knew what they were doing, the results were fantastic.
It's like before the coffee would be anywhere beteween a 6 and 9 out of 10. Now they're consistently 7.5 out of 10 every time. Boring, predictable, never bad, but never great.
Eventually automated systems ought to be able to do this better than most people can. Why couldn't there be engineered sensors that could detect such things very well?
And given that the act of making good-enough coffee isn't a very difficult task (given how readily available and quickly trained "baristas" are), and how mechanical the process is already, im not sure there's anything to suggest it isn't do-able. Its more likely a matter of cost and scale
Replicating this with electrical sensors is a pretty complex task we still haven't managed to get working, after all we are not only talking about replicating the sense of taste but also the sense of smelling and how they interact with each other.
Generating a brand new style of good coffee might need the interaction though
How to calibrate a sensor for something like that on a per user basis? I don't know, but apparently it's possible because "electronic noses" do exist but are mostly used in laboratory settings, probably on account of their price.
There's also a reason why we still use pigs and dogs for work that require good smelling senses, like search&rescue or truffle foraging. Training these animals is very expensive, but it still seems to be the cheaper option compared to building "smellobots", so I doubt smelling sensor are far enough along to be put into a ton of kitchen bots at small cost.
This is not a trivial matter! Cost is entirely the reason a host of technologically-possible automation hasn't happened outside a lab.
The sun will eventually engulf the Earth rendering this argument irreelvant.
Smell, taste and poison are all matters of physical molecules and how these interact with human physiology. We already understand these to some extent. We can already build devices that can detect some of these things to some extent. We have no grounds to say it's impossible for a human-level ability of it to be engineered. (Note that lack of positive evidence against X is not the same as positive evidence for X).
A robot has no way of knowing if the coffee will taste good or contains rat poison. It's just going through the motions. If it serves you a dud drink you can't argue with it, you just got scammed. Post an angry Yelp review if it makes you feel better.