In a large bowl, whisk together flour, salt, and sugar. Cut in the cold butter using a pastry cutter or your fingertips until it resembles coarse crumbs. Slowly add ice water, 1 tablespoon at a time, mixing until dough comes together.
Divide the dough into two discs, wrap in plastic wrap, and chill for at least 1 hour.
In a large bowl, toss sliced apples with brown sugar, white sugar, lemon juice, cinnamon, nutmeg, cornstarch, and vanilla. Let sit while you roll out the crust.
Preheat oven to 400°F (204°C). Roll out one dough disc and fit into a 9-inch pie plate. Fill with the apple mixture. Roll out second disc and lay over the top. Trim excess, crimp the edges, and cut slits in the top for steam to escape.
Brush with egg wash and sprinkle with sugar if desired.
Bake at 400°F for 20 minutes, then reduce to 350°F and bake for another 30–40 minutes, or until crust is golden and filling is bubbling.
While the pie cools, melt caramels and butter in a saucepan over low heat, stirring until smooth.
Let pie cool at least 1 hour before slicing. Drizzle caramel over each slice just before serving.