Preheat your oven to 350°F (175°C). Grease and flour the cake pans.
In a large mixing bowl, sift together the flour, cocoa powder, baking powder, and salt. Set aside.
In another bowl, whisk the eggs and granulated sugar until pale and fluffy.
Gradually add the melted butter, brewed espresso, and vanilla extract to the egg mixture, mixing well.
Slowly incorporate the dry ingredients into the wet ingredients, mixing until just combined.
Divide the batter evenly between the prepared cake pans. Bake for 20-25 minutes or until a toothpick inserted in the center comes out clean.
Allow the cakes to cool in the pans for 10 minutes before transferring them to a wire rack to cool completely.
While the cakes are cooling, prepare the mascarpone filling. In a mixing bowl, combine the mascarpone, heavy cream, powdered sugar, brewed espresso, and vanilla extract. Beat until smooth and creamy.
Once the cakes are completely cool, cut each cake in half horizontally to create four layers.
Place one layer on a serving plate. Brush with 1/4 cup of the brewed espresso (and coffee liqueur if using).
Spread a layer of the mascarpone filling over the cake layer. Repeat the process with the remaining layers, finishing with a layer of mascarpone on top.
Chill the assembled cake in the refrigerator for at least 2 hours before serving to set.
Dust the top with cocoa powder before serving.