Preheat oven to 350°F (175°C). Grease two 9-inch round cake pans, line bottoms with parchment paper, grease the parchment, and dust with cocoa powder.
In a large bowl, whisk together flour, sugar, cocoa powder, baking soda, baking powder, and salt for 30 seconds until uniform.
In a separate bowl, whisk eggs until frothy. Add cooled coffee, buttermilk, oil, vanilla extract, and peppermint extract; whisk until smooth.
Pour wet ingredients into dry ingredients. Mix on low for 30 seconds, then beat on medium for 2 minutes, scraping down sides halfway. Batter will be thin.
Divide batter evenly between prepared pans (about two-thirds full). Bake on center rack for 30 minutes, until a toothpick comes out with a few moist crumbs.
Cool cakes in pans on racks for 10 minutes. Run a knife around edges, invert onto racks, peel off parchment, and cool completely right-side up, about 1 hour.
Beat softened butter on medium for 2 minutes until fluffy. Gradually add powdered sugar, then heavy cream and peppermint extract. Beat on low 1 minute, then high 3 minutes. Add red food coloring if desired.
Place one cake layer on a serving plate and spread 1 1/2 cups buttercream on top. Add second layer, press gently, then apply a thin crumb coat. Refrigerate 15 minutes, then frost with remaining buttercream and smooth with an offset spatula.
Crush candy canes in a zip-top bag with a rolling pin. Press crushed candy onto sides and sprinkle over top. Garnish with whole mini candy canes if desired. Refrigerate at least 30 minutes before serving.