Preheat the oven to 400?F.
Melt 2 tablespoons of butter in a large skillet over medium heat. Add the onions and cook, stirring often, until caramelized, about 30 minutes. Season the onions with 1/2 teaspoon salt and 1/4 teaspoon black pepper. Set the onions aside to cool.
Using the same skillet, melt another 2 tablespoons of butter over medium-high heat, and cook about one-fourth of the potatoes until lightly caramelized, about 5 minutes. Season the potatoes with 1/2 teaspoon salt and 1/4 teaspoon black pepper. Set the potatoes aside to cool. Repeat this process with the remaining butter, potatoes, salt, and pepper. Arrange one-fourth of the cooled potatoes in a slightly overlapping single layer in a 9 x 13-inch casserole. Scatter a third of the caramelized onions over the potatoes and sprinkle with 1 teaspoon thyme. Place another fourth of the potatoes on top of the onions, another third of the onions, and another teaspoon thyme. Repeat this process with half of the remaining potatoes and the remaining onions and thyme, finishing with a layer of potatoes.
Pour the Chicken Stock over the potatoes and place the casserole in the oven. Bake the casserole for 25 minutes, reduce the temperature to 350?F, and continue to bake until the potatoes are golden brown, about 30 minutes more.
Remove the casserole from the oven, and allow to cool for 10 minutes before serving.
Makes 10 to 12 servings