For the potatoes: Steam the potatoes in a covered saucepan with about 1 inch/2.5 cm water in the bottom, until very tender, about 30 minutes.
For the mushrooms: Clean and quarter the mushrooms. Heat just 2 tablespoons of the butter with 1 tablespoon of the olive oil and saute the mushrooms until cooked and golden. Remove from the pan. Heat the other spoonful of olive oil (adding more if you need it) and saute the onion until soft. Add the garlic for 1 minute. Deglaze with the wine and reduce to no more than a spoonful. Add the stock, thyme and mushrooms, season with salt and pepper and cook until the stock has reduced by half. Knead together the flour with the last tablespoon of butter and stir it in. Cook until the liquid has thickened to a sauce, a matter of minutes. Stir in the parsley. Spoon the mixture into a gratin dish.
For the cheese potato top: Heat the oven to 425 degrees F/220 degrees C. Mash the potatoes with the milk and butter until smooth, adding more milk if needed. Season with salt and pepper. Stir in the diced cheese. Distribute evenly over the mushroom mixture, and smooth with the back of the spoon (if you want to be very retro-housewife, make patterns with the tines of a fork or make waves with a spoon). Sprinkle over the Parmesan. Bake the gratin until bubbling hot and golden on top, about 15 minutes.