The apple compote is deeply flavored, smooth, and rich. Use it in this decadent apple-rum spice cake, and serve leftovers with waffles or latkes. A Braeburn or Fuji apple would make a good substitute for McIntosh apples here.
Stir together apples, sugar, flour, salt, and cinnamon in a large skillet. Let stand at room temperature, stirring occasionally, until sugar begins to dissolve, about 30 minutes.
Cook apple mixture in skillet over medium-high, stirring often, until tender, about 5 minutes.
Pour rum into a heatproof measuring cup with a pour spout. Remove skillet from heat; turn off burner. Pour rum into skillet. Carefully ignite the fumes just above the rum mixture with a long match. Gently shake skillet until flames extinguish, about 1 minute.
Return skillet to heat over medium-high; cook, stirring often, until liquid has almost completely evaporated, about 2 minutes. Remove from heat.
Break up apple mixture using a potato masher or fork until mostly smooth. Stir in lemon juice and vanilla. Set aside at room temperature to cool completely, about 30 minutes.
Compote can be prepared up to 3 days ahead and stored in an airtight container in refrigerator.