When I was at McDonalds (mid 1990s) they already has robotic french fry machines - I didn't see it but my understanding (and faulty memory) is frozen fries went in one end, cooked (not boxed) fries came out the others. I remember our managers discussing it and really wanting it for the safety, but they couldn't make the payments (the current fry vat was failing so they already had to pay for the labor and a fryer, but the additional cost of the robot was too high)
Note that I said safety. They were not thinking about labor costs, they were thinking about how it would not splash hot oil on kids. I think it is fair to say that every fast food would accept a 1% loss of profit margin (that 4% to 3% profit margin) just to not have humans interact with burning hot machines.