Preheat the oven to 350°F (180°C) and place oven racks in the upper and lower third of the oven. Add 16 cupcake liners to two 12-cup cupcake pans.
Sift the flour, cocoa powder, baking powder, and salt into a medium bowl. Set aside.
Place the chopped chocolate in a bowl and pour the hot coffee over top. Let it sit for a few minutes, then whisk to melt all of the chocolate. Set aside.
In the bowl of a stand mixer fitted with a paddle attachment (or with a handheld electric mixer), beat the butter until smooth and creamy. Add the sugar and continue beating until the mixture is fluffy (this will take about three minutes). Stop and scrape down the sides of the bowl as needed.
Add the eggs, one at a time, mixing well after each addition.
Add the vanilla extract and beat to combine. Then add the melted chocolate and coffee mixture, and beat until incorporated.
In a small bowl, whisk to combine the milk and sour cream.
Beating on low speed, add a third of the flour mixture, mixing just until combined. Add half of the sour cream mixture, beating just until combined. Continue alternating with another third of the flour, the rest of the sour cream, and finally the remaining flour.
Divide the batter evenly among cupcake papers. Bake for about 18 minutes or until a toothpick inserted in the center comes out clean. Remove from the oven and place on a wire rack to cool completely.
For the Frosting:
In a medium saucepan, combine the sugar, milk, egg yolks, butter, and salt. Cook over medium heat, stirring constantly, for about 5 minutes, until the mixture begins to boil and thicken. Remove from the heat and stir in the coconut, pecans, and vanilla extract. Let cool until spreadable (about 30-60 minutes).
For the Ganache Filling:
Place the chocolate in a heatproof bowl and set aside.
Heat the cream in a small saucepan over medium heat, just until it begins to bubble (do not let it boil.) Pour the cream over the chocolate and allow it to sit for a few minutes. Whisk together until there are no lumps. Pour in the bourbon if using and whisk again.
For the Assembly:
Use an apple corer to remove the center of each cupcake, being careful not to cut all of the way through to the bottom. Trim the bottom of the removed cupcake centers, leaving a ½-inch thick piece from the top. Set aside the top pieces.
Fill the cored cupcake holes with a big spoonful of ganache. Top with the reserved pieces from the core.
Cover the tops generously with coconut frosting. Drizzle with more ganache, and add a candied pecan to the top of each cupcake.
Video
Notes
When removing the cupcake centers, be careful not to go all the way through to the bottom. Otherwise, when you fill the cupcakes, the ganache will leak out through the bottom. Instead, only go about 1 inch into the middle of the cupcakes. And don't worry about it being perfectly neat, either, since you'll cover the top of the cupcake. The frosting hides any imperfections!