Restaurant profit margins are not high, there is way too much competition. Until recently, and probably even now, the robotic technology needed to automate the kitchen would have been prohibitively expensive and likely unreliable. Restaurant kitchens are hot, greasy, steamy environments. Also anything that's used for food production has to be able to be regularly cleaned by immersion or high pressure hot water or chemical cleaning. Not great for electronics and precision mechanisms unless they are built to rugged specifications (not inexpensive). Even ordinary, manually operated restaurant equipment is very expensive compared to what we buy to use at home, and the reason is that reliability must be very high; you cannot afford to lose your production capability for even a short time, since restaurants are the ultimate just-in-time production operation.
Finally, unlike more traditional factory operations (e.g. automobile manufacturing) where robots replaced highly paid unionized workers, the average McDonald's worker probably makes less than $10/hr with minimal benefits. At maximum staffing, labor costs for the kitchen staff might be $50/hr, and at most times of the day, less than that. There's just not a huge savings to be had.