How to Make It
Preheat oven to 450°F. Grease an 18- x 13-inch rimmed baking sheet with 1 tablespoon of the butter.
Melt remaining 3 tablespoons butter in a saucepan over medium. Add garlic; cook, stirring often, until fragrant, about 1 minute. Whisk in flour; cook, whisking constantly, 1 minute. Whisk in cream, and cook, stirring constantly, until slightly thickened, about 3 minutes. Remove from heat; add 2 cups of the cheese, and stir in pepper and 2 teaspoons of the salt. Stir until cheese melts and sauce is smooth; stir in peas.
Spread half of potato slices and half of ham on prepared baking sheet. Spread half of cheese sauce over potatoes and ham. Repeat layers once with remaining potatoes, ham, and cheese sauce. Cover baking sheet with aluminum foil, and bake in preheated oven until potatoes are tender, about 40 minutes.
Stir together panko, thyme, and remaining 3/4 cup cheese in a small bowl. Remove foil, and sprinkle panko topping over potato mixture. Return to oven, and bake at 450°F until panko topping is golden brown, 20 to 25 minutes.