Really cooking is just chemistry. The only real variable that would be tough to overcome would be the fact that not every piece of meat or broccoli or cheese or whatever tastes exactly the same as any other because biology is highly variable. Otherwise there is no reason you couldn't program a robot to make nearly any dish, with the correct ingredients available, and even to at some point be able to take samples and conduct chemical analysis and determine that, for example and just spitballing for fun, say that a 1.5-2.5% salt content in a given dish would be appropriate and something humans would find tastes good, so it aims for that percentage. Stuff like that is possible and will become more possible, and more likely, as we progress.