Preheat your oven to 375°F (190°C). Lightly grease a 9x13-inch (23x33 cm) baking dish.
In a large skillet over medium-high heat, cook the ground pork until browned, about 8-10 minutes, breaking it apart with a spoon. Drain excess fat. Stir in the thyme, paprika, salt, and pepper. Remove pork from the skillet and set aside.
In the same skillet, melt the butter over medium heat. Add the onion and cook until softened, about 4 minutes. Add the garlic and cook for 1 minute more until fragrant.
Sprinkle the flour over the onions and stir constantly for 1 minute. Gradually whisk in the milk and chicken broth. Bring to a simmer, whisking often until the sauce thickens, about 3-5 minutes. Remove from heat.
Arrange half of the sliced potatoes in the bottom of the prepared baking dish. Top with half of the cooked pork, then pour half of the sauce over it. Sprinkle with ¾ cup of cheddar cheese.
Repeat the layers with the remaining potatoes, pork, and sauce. Top with the remaining ¾ cup of cheese. If using, sprinkle the panko breadcrumbs evenly over the top.
Cover the dish with aluminum foil and bake for 40 minutes.
Remove the foil and bake for another 15-20 minutes, or until the potatoes are fork-tender and the top is golden. The casserole is done when an instant-read thermometer inserted into the center registers 160°F (71°C).
Let the casserole rest for 5 to 10 minutes before you slice and serve it.