Preheat the oven to 180 C / Gas 4. Grease a 23cm springform tin.
Place the flour, oats, baking powder, sugar, vanilla extract and salt in the food processor fitted with a blade. Process with the pulse function until the mix acquires a sandy consistency. If the coconut oil is hard, briefly warm it in the microwave. Add it to the dough together with the egg whites and pulse until evenly mixed and holding together as a ball. If you do not have a food processor, you can also mix all the base ingredients except the oats with an electric mixer, then add the oats and mix to combine. The base will have a a sligthly coarser consistency.
Distribute the base in the prepared tin and gently press it down with your hands, forming a 2cm edge all around. Place it in the freezer for a few minutes while you proceed with the next steps.
Peel, quarter, core and thinly slice the apples.
Stir the eggs yolks with the custard powder, cream and sugar until smooth. Spread it over the base. Arrange the apple slices on top in an overlapping pattern. Sprinkle with demerara sugar.
Bake in the preheated oven until the base is lightly browned, about 45 minutes. Let cool in the tin, loosen the edge and gently unmould.