To make the dough by hand: Whisk together the flour, sugar and salt in a medium bowl. Using your fingers, work the butter into the dry ingredients until it resembles yellow cornmeal mixed with bean-size bits of butter. (If the flour/butter mixture gets warm, refrigerate it for 10 minutes before proceeding.) Add the egg and stir the dough together with a fork or by hand in the bowl. If the dough is dry, sprinkle up to a tablespoon more of cold water over the mixture.
To make the dough in a food processor: Pulse the flour, sugar and salt in a food processor fitted with the metal blade until combined. Add the butter and pulse until it resembles yellow cornmeal mixed with bean-size bits of butter, about 10 times. Add the egg and pulse 1 to 2 times; don't let the dough form into a ball in the machine. (If the dough is very dry, add up to a tablespoon more of cold water.) Remove the bowl from the machine, remove the blade and bring the dough together by hand.
Form the dough into a disk, wrap in plastic wrap and refrigerate until thoroughly chilled, at least 1 hour.
For the filling: Put the lemon juice in a medium bowl. Peel, halve and core the apples. Cut each half into 4 wedges. Toss the apple with the lemon juice. Add the sugar and toss to combine evenly.
Melt the butter over medium-high heat in a large frying pan. Add the apples and cook, stirring, until the sugar dissolves and the mixture begins to simmer, about 2 minutes. Cover, reduce the heat to medium-low and cook until the apples soften and release most of their juices, about 7 minutes.
Strain the apples in a colander over a medium bowl to catch all the juice. Shake the colander to get as much liquid as possible. Return the juices to the skillet, and simmer over medium heat until thickened and lightly caramelised, about 10 minutes.
Toss the apples with the reduced juice and spices in a medium bowl. Set aside to cool completely. (This filling can be made up to 2 days ahead and refrigerated or frozen for up to 6 months.)
To assemble the pie: Cut the dough in half. On a lightly floured surface, roll each half into a disc 11 to 12 inches wide. Layer the dough between pieces of parchment or wax paper on a baking sheet and refrigerate for at least 10 minutes.
Place a baking sheet on a rack in the lower third of the oven and preheat the oven to 190°C.
Line the bottom of a 9-inch pie pan with one of the discs of dough, and trim it so it lays about 1/2 inch beyond the edge of the pan. Add the apple filling to the pan.
Use a chef's knife or a pizza cutter and cut the second round into 1/2-inch thick strips. Lay strips of dough, evenly spaced, across the entire pie. Weave more strips of dough perpendicular through the previous strips to make a lattice or basket weave design across the entire pie. Trim the excess ends from the strips of dough. Pinch the bottom crust edge and lattice edge together, and flute the edge as desired. Brush the surface of the dough with egg and then sprinkle with sugar. Refrigerate for at least 30 minutes.
Bake the pie on the preheated baking sheet until the crust is golden, 50 to 60 minutes. Cool on a rack for at least 3 hours before serving. The pie keeps well at room temperature (covered) for 24 hours, or refrigerated for up to 4 days.