Mix the flour, salt, and sugar in a large bowl.
Cut the cold butter into the flour mixture until it looks like coarse crumbs.
Add the ice water one tablespoon at a time until the dough comes together.
Divide the dough into two discs and wrap each one tightly.
Chill the dough for at least 2 hours.
Preheat the oven to 425°F.
Roll out the first disc on a lightly floured surface.
Place the rolled dough into a 9-inch pie dish and press it gently into place.
Chill the pie dish for 10 minutes.
Add the sliced apples to a large bowl.
Sprinkle the apples with lemon juice and toss to coat.
Mix the granulated sugar, brown sugar, cinnamon, nutmeg, salt, and flour in a separate bowl.
Pour the dry mixture over the apples and toss until evenly coated.
Spoon the apple filling into the prepared crust.
Dot the filling with the small cubes of butter.
Roll out the second disc of dough.
Place the rolled dough over the filling.
Trim, fold, and crimp the edges to seal the crusts together.
Cut 4 to 6 small vents in the top crust.
Whisk the egg and water together in a small bowl.
Brush the egg wash over the top crust.
Sprinkle coarse sugar on top if using.
Place the pie on a baking sheet to catch any drips.
Bake the pie at 425°F for 15 minutes.
Reduce the temperature to 375°F without opening the oven door.
Continue baking for 40 to 45 minutes or until the crust is golden brown and the filling is bubbling through the vents.
Remove the pie from the oven.
Let the pie cool for at least 2 hours before slicing.