Preheat the oven to 180 C / Gas 4. Line a muffin tin with 12 paper cases.
Combine the flour, sugar, baking powder, butter, eggs and all but about 2 tablespoons of caramel in a bowl and beat together for about 2 minutes until smooth and well blended; add the remaining caramel if the mixture appears too thick. Spoon into the prepared cases and sprinkle with the demerara sugar.
Bake cupcakes in the oven for 20 minutes until well risen and golden brown on the top. Transfer to wire rack to cool.
To make the icing, heat the caster sugar in a pan over a low heat until melts and turns golden. Meanwhile, warm the butter and cream, then pour into the caramelised sugar and stir over a low heat till blended. Beat in the icing sugar and reserved caramel until the mixture is smooth and creamy. Remove from heat and let cool.
Pipe or use a spatula to swirl the cooled icing on top of the cooled cakes.