Preheat the oven to 350 degrees F. Generously coat a 12-cup muffin pan with cooking spray and set aside.
In a small bowl, combine the whipping cream and salt, stirring to dissolve the salt.
Peel the potatoes if you’d like, then thinly slice them. Layer about 1/3 of the potatoes into the muffin cups, arranging the slices into neat stacks.
Spoon about 1/2 teaspoon of the cream mixture over each stack. Place a piece of ham on top, then sprinkle on about 1/3 of the cheese and 1/3 of the thyme.
Repeat another layer of potatoes, cream mixture, ham, cheese, and thyme. Finish with the remaining potatoes and remaining cream mixture.
Cover loosely with foil and bake for 35 minutes.
Remove the potato stacks from the oven, uncover, and sprinkle with the remaining cheese and remaining thyme.
Continue to bake uncovered until the cheese is golden and the potatoes are tender, 10 to 15 minutes.
Let stand 5 minutes before using a spoon or offset spatula to carefully remove the stacks from the muffin cups.
Garnish with thyme sprigs, sprinkle with flaked salt (if using), and serve.