Make the crust: In a large bowl, whisk together flour, salt, and sugar. Cut in the cold butter until mixture resembles coarse crumbs. Gradually add ice water, 1 tablespoon at a time, mixing just until dough comes together.
Divide dough in half, shape into disks, wrap in plastic wrap, and refrigerate for at least 1 hour.
Preheat oven to 400°F (200°C).
In a large bowl, toss apple slices with sugar, flour, lemon juice, cinnamon, nutmeg, and salt until well coated.
Roll out one disk of dough and line a 9-inch pie dish. Add apple filling and dot with diced butter.
Roll out the second disk and place over the filling. Trim and crimp the edges. Cut slits in the top crust.
Brush top with beaten egg and sprinkle with coarse sugar if using.
Bake for 20 minutes at 400°F, then reduce heat to 375°F (190°C) and bake for another 35–40 minutes, until crust is golden and filling is bubbly.
Cool at room temperature for at least 2 hours before slicing.