Remove the butter from the refrigerator 1–2 hours before cooking to allow it to soften.
Sift flour into a large bowl, add salt.
Form a mound of flour with a well in the center.
Add sugar, put in soft cubes of butter, break an egg.
Knead the dough, adding water in small portions. The mixture should be elastic.
Form a ball from the dough, wrap it in cling film and place it in the refrigerator for 30 minutes.
Roll the chilled dough into a circle the size of the baking pan. Cover the dough again with plastic wrap and refrigerate.
Prepare the filling: combine the butter, water, and sugar and place over low heat. Heat until an amber caramel forms. Shake the pan occasionally during this process.
Peel the apples and remove the seeds. Cut the prepared fruits into slices.
Pour the caramel into a baking dish, previously greased with butter.
Place apple slices on top of the caramel, overlapping them in a circle. They will shrink slightly during baking.
Cover the apples with the dough, folding the edges of the dough inward so that small sides are formed when turning them over.
Lightly cut the center of the dough to allow steam to escape.
Preheat the oven to 180°C and place the pie in. Bake for 30–40 minutes.