Mix 450 g flour, 300 g sugar, 375 g butter, 2 medium eggs, and 2 pinches salt in a bowl. Knead into a smooth dough. Wrap in cling film and refrigerate for 2 hours.
Wash, peel, halve, and core apples. Cut into small cubes. Mix with lemon juice, lemon zest, raisins, almonds, salt, sugar, and cinnamon.
Roll out half the dough and place on a greased baking sheet. Pierce several times with a fork. Spread the apple filling evenly over dough. Roll out remaining dough thinly and place over filling. Trim protruding edges. Knead trimmings into a 1 cm thick rope and place around the perimeter. Press lightly and make a fork pattern along the edge. Bake at 180–200°C (356–392°F) with top and bottom heat for 50–60 minutes.
Mix powdered sugar, lemon juice, and water to make a glaze. Spread over the cooled cake. Sprinkle with flaked almonds and top with small lemon balm sprigs. Cut into 15–20 pieces, arrange on a serving plate, and serve.