Boil the potatoes in salted water until fork-tender. Drain and mash them in a large bowl.
Add the shredded cheese, eggs, cream, salt, pepper, nutmeg (if using), and thyme. Mix until smooth and well combined.
Preheat the oven to 350°F (180°C). Butter four individual ramekins (or small oven-safe dishes).
Fill each ramekin halfway with the potato mixture.
Add 3 small slices of cheese, 1 slice of ham (folded or cut to fit), then 3 more small slices of cheese.
Cover with more potato mixture, sprinkle with Parmesan cheese and a little fresh thyme.
Bake for about 25 minutes, or until the tops are golden and set.
Remove from the oven and let cool slightly before serving.
Served with a salad
