Melt the butter in a large saucepan over medium heat. Add the shallots, leeks, mushrooms, and garlic and season with salt and pepper. Cook, stirring occasionally, until the vegetables have softened, 5 to 10 minutes.
Add the wine and thyme sprigs to the pan and cook until the wine has almost evaporated, 3 to 5 minutes. Remove and discard the thyme sprigs and scrape the vegetables and any liquid into a bowl.
In a large bowl, whisk together the eggs, a generous pinch of salt and pepper, and the cheese. Add the cooked vegetables, brioche, and parsley, and toss to combine. Mix in 1/2 cup stock. Continue to add as much of the remaining 1/2 cup stock, a couple tablespoons at a time, as needed until the stuffing is moist but not wet (there should not be any liquid in the bottom of the bowl). Transfer the stuffing to a buttered 9-by-13-inch baking dish and cover with buttered aluminum foil.
Preheat the oven to 350°F (177°C) or, if you've been roasting a turkey, when you remove the turkey from the oven and set it aside to rest, adjust the oven temperature to 350°F (177°C).
Place the covered baking dish in the oven and bake until the stuffing is warmed through, 25 to 30 minutes. Then uncover the stuffing and bake until golden, about 15 minutes. Serve immediately.