Special equipment: Special equipment: twelve 8-ounce mason jars
For the cake: Preheat the oven to 350 degrees F. Grease (with cooking spray) and flour a 12-cup muffin pan.
Sift the flour, baking powder and salt into a large bowl.
Beat the egg yolks with 3/4 cup of the sugar in a medium bowl with an electric mixer on high until the yolks are pale yellow. Stir in the milk and vanilla. Pour the egg yolk mixture over the flour mixture and stir very gently until combined.
Beat the egg whites in a separate bowl with the mixer on high until soft peaks form. With the mixer on, pour in the remaining 1/4 cup sugar and beat until the egg whites are stiff but not dry. Fold the egg white mixture into the batter very gently until just combined. Spoon the batter into the cups of the muffin pan using a 1/3-cup measure.
Bake the cakes until risen and lightly golden, 13 to 14 minutes. Allow to cool in the pan.
For the tres leches mixture: Combine the sweetened condensed milk, evaporated milk, heavy cream, cream of coconut and rum if using in a small pitcher.
For the whipped cream: Whip the cream with the sugar until soft peaks form.
To assemble: Use a serrated knife to slice each cake in half across the middle. Place a cake half in the bottom of each 8-ounce mason jar. Spoon over 2 tablespoons of the tres leches mixture and 2 tablespoons crushed pineapple. Put the other half of each cake on top, and spoon over 2 to 3 more tablespoons of the tres leches mixture. Top each cake with lots of whipped cream and toasted coconut.
Refrigerate until ready to serve. Several hours is fine. The cooler the cakes, the better.