Mushroom-Thyme Pot Pies

Ingredients:
2 1/4 cups all-purpose flour
1 1/2 teaspoon kosher salt
1/2 cup (1 stick) chilled unsalted butter, cut into pieces
1 large egg, beaten to blend
1 tablespoon distilled white vinegar
2 tablespoons olive oil
5 tablespoons unsalted butter, divided
1 medium onion, chopped
1 tablespoon tomato paste
1 pound button or crimini mushrooms, stems trimmed, quartered
1/2 cup dry sherry
4 cups low-sodium chicken broth
1/4 cup dried porcini mushrooms
3 tablespoons all-purpose flour
1/2 fennel bulb, chopped
1 cup red pearl onions, peeled
3 tablespoons unsalted butter, divided
Kosher salt, freshly ground pepper
2 sprigs thyme, plus leaves for serving
8 ounces oyster or maitake mushrooms
All-purpose flour (for surface)
1 large egg
Flaky sea salt
Eight 6-oz. ramekins

Instructions:
Whisk flour and salt in a large bowl. Work in butter with your fingers until only pea-size pieces remain. Combine egg, vinegar, and 1/3 cup ice water in a small bowl and drizzle over flour mixture; quickly work in with your fingers until a shaggy dough forms.
Turn out dough onto a work surface and press together, working just enough to form a smooth ball with no dry spots. Wrap in plastic and chill until very cold, at least 2 hours.
Heat oil and 2 Tbsp. butter in a medium saucepan over medium. Cook onion, stirring occasionally, until very soft, 10–12 minutes. Add tomato paste and cook, stirring often, until color darkens and paste completely coats onion, about 1 minute. Add button mushrooms and cook, stirring occasionally, until softened and any liquid has evaporated, 12–15 minutes. Add sherry and cook until almost completely evaporated, about 5 minutes. Add broth and porcini mushrooms. Bring to a simmer and cook until reduced by half (about 2 1/2 cups), about 1 hour. Strain mushroom broth through a fine-mesh sieve into a medium bowl, pressing down on solids; discard solids.
Heat remaining 3 Tbsp. butter in a large saucepan over medium. Whisk in flour and cook, whisking often, until flour begins to smell nutty, about 4 minutes. Whisking vigorously to prevent lumps, add mushroom broth and increase heat to medium-high. Bring to a simmer and cook 1 minute. Remove from heat.
Place a rack in middle of oven; preheat to 425°F. Combine fennel, onions, 1 Tbsp. butter, and 1 cup water in a small saucepan; season with kosher salt and pepper. Bring to a boil over medium-high, cover, and reduce heat. Simmer until fennel and onions are crisp-tender, 5–8 minutes. Uncover; cook until liquid evaporates, 15–18 minutes. Let cool.
Heat remaining 2 Tbsp. butter in a large skillet over medium. Cook thyme sprigs and mushrooms, tossing occasionally, until mushrooms are browned and tender, 6–8 minutes. Let cool; pluck out thyme.
Divide fennel mixture and mushrooms among ramekins. Spoon gravy over top. Divide dough in half. Working with one at a time, roll out to 1/4" thick. Cut out 2 rounds about 1/2" wider than the diameter of ramekins. Gather up scraps, reroll, and cut out 2 more rounds (for 8 total).
Whisk egg, a pinch of kosher salt, and 1 tsp. water in a small bowl. Brush dough with egg wash; place over ramekins, brushed side down. Press firmly around sides to adhere. Brush tops of dough with egg wash; sprinkle with thyme leaves and sea salt. Set pot pies on a rimmed baking sheet and bake until crusts are golden brown and domed, 25–35 minutes.
Dough can be made 3 days ahead. Keep chilled. Gravy can be made 3 days ahead. Let cool; cover and chill. Pot pies (without brushing outside of pastry and topping) can be assembled 1 day ahead. Cover pot pies and extra egg wash separately and chill.