1 teaspoon butter, or as needed
3 large russet potatoes, scrubbed
3 teaspoons kosher salt
½ teaspoon freshly ground white pepper
1 pinch cayenne pepper, or to taste
2 ½ cups grated sharp white Cheddar cheese
1 ¾ cups sour cream
Preheat the oven to 400 degrees F. Butter a casserole dish.
Wrap each potato in foil and place on a baking sheet. Poke holes into potatoes using a knife.
Bake in the preheated oven until very tender and easily pierced with a knife, about 1 hour and 15 minutes.
Let potatoes cool to room temperature, at least 20 minutes. Unwrap. Cover with plastic wrap and refrigerate until completely chilled, 8 hours to overnight.
Preheat the oven to 425 degrees F.
Shred potatoes into a large bowl using a cheese grater. Mince shallots to get 1/4 to 1/3 cup.
Add shallots in with the potatoes; season with salt, white pepper, and cayenne. Toss with two forks until well combined. Add Cheddar cheese and mix well. Gently toss in sour cream until barely combined. Transfer mixture into the prepared baking dish, piling it up high, then patting it down very lightly.
Bake in the preheated oven until piping hot and top is browned, 30 to 35 minutes.