Preheat the oven to 350°F (175°C) and line a muffin tin with cupcake liners.
In a bowl, whisk together flour, cocoa powder, baking powder, baking soda, salt, and sugar.
In a separate bowl, mix eggs, milk, and vegetable oil until combined.
Add the wet ingredients to the dry ingredients and mix until combined.
Stir in the hot coffee until the batter is smooth.
Fill each cupcake liner about two-thirds full with batter and bake for 18–20 minutes.
Allow cupcakes to cool completely.
Prepare brownie squares in advance, ensuring they fit well atop the cupcakes.
To make the buttercream, beat softened butter until fluffy.
Gradually add powdered sugar and cocoa powder, mixing continuously.
Pour in heavy cream and vanilla, then whip until smooth and pipeable.
For the edible cookie dough, heat-treat flour at 350°F for 5 minutes and cool.
Cream softened butter and brown sugar together.
Add vanilla extract and milk, then stir in the heat-treated flour and mini chocolate chips.
Scoop dough into small balls and chill slightly to hold shape.
To prepare ganache, heat cream until simmering and pour over chopped chocolate.
Let sit for 2–3 minutes then stir until glossy and smooth.
Assemble the cupcakes by piping a thick swirl of chocolate buttercream on each cupcake.
Place a brownie square on top of the frosting.
Add a small scoop of edible cookie dough on top of the brownie.
Drizzle warm ganache generously over the cookie dough and allow it to drip down.
Finish with a dusting of powdered sugar for a dramatic effect.
Serve slightly chilled and allow to sit at room temperature for 10 minutes before eating.