Make the Caramel Sauce:
In a medium saucepan over medium heat, cook sugar, stirring constantly, until it melts into an amber-colored liquid.
Add butter and stir until melted.
Slowly pour in heavy cream (it will bubble) and stir until smooth. Remove from heat and stir in salt. Let cool slightly.
Prepare the Pie Filling:
In a large mixing bowl, toss apple slices with lemon juice, sugars, flour, cinnamon, nutmeg, salt, and vanilla.
Assemble the Pie:
Preheat oven to 400°F (200°C).
Roll out bottom crust and place in a 9-inch pie dish.
Fill with apple mixture and drizzle with about 1/2 cup salted caramel sauce (reserve the rest for serving).
Top with second crust or lattice. Trim and crimp edges. Brush with milk or cream and sprinkle with coarse sugar if desired.
Bake:
Place pie on a baking sheet to catch drips. Bake for 20 minutes at 400°F (200°C), then reduce temperature to 375°F (190°C) and bake for an additional 35–45 minutes, or until crust is golden and filling is bubbling.
Cool & Serve:
Let pie cool at least 2 hours before slicing to allow filling to set.
Serve with extra salted caramel sauce and vanilla ice cream if desired.