That sounds like an interesting engineering challenge! Assuming we have a stove with a fast-acting heat source (e.g. induction) and high-frequency thermometer (> 1 Hz), what can we learn about the contents of the pot/pan?
I'm thinking: dump a set amount of energy into the pan (say, 0.5 seconds at "power boost" level), then watch the thermometer. Do it several times, with varying pulse lengths (say, 0.1 to 1 second - you don't want to burn anything on the pan, nor wait too long for it to cool down). This should give you a good idea of the pan's step and impulse response, and - I think - you could guesstimate what its contents are - particularly, if there are any liquids in it, and what they are. Then, continue with normal cooking, but keep a continuous record of power output vs. temperature measurement, and possibly occasionally pause and do a round of such pulse tests again.
I see no obvious reason this wouldn't give a stove quite good control authority even in the presence of liquids, including those that are added or naturally seep out during cooking. I also don't expect any of the appliance companies to ever include this level of sophistication in their products.