Has the dealer monitored some of the sensors real-time when the issue was present to see if everything is reading normal? For example, I would suggest they monitor the Engine Coolant Temperature (ECT) sensor, the Short Term Fuel Trim (STFT), Intake Air Temperature (IAT) sensor readings, Mass Air Flow (MAF) sensor flow (if your engine has a MAF sensor) and/or Manifold Absolute Pressure (MAP) sensor readings. They should compare these sensor readings against applicable measured or observed values to make sure they are reasonable. For example, they can use a IR thermometer to determine approximately what the ECT really is, they can use the same IR thermometer to get a feel for a realistic IAT. If the MAF or MAP sensor readings are jumping all over the place with no throttle input, that could suggest the sensor has an issue (although some of that could be due to the misfire or stumbling).
If the dealership has any real technicians (versus scan tool users) they should be able to help track this down, as long as they are able to duplicate the issue. Maybe they would be willing to drive your car home a few days while leaving you another similar model loaner. It would be interesting to see if the loaner vehicle really does do the same thing.
-Rod