Make the cake: Preheat the oven to 325 degrees F. Butter the bottoms and sides of two 9-inch round cake pans; line the bottoms with parchment paper. Butter the parchment and dust the bottom and side of each pan with flour, tapping out the excess. Whisk the flour, baking powder and salt in a medium bowl; set aside.
Beat the butter in a large bowl with a mixer on medium-high speed until creamy, about 1 minute. Add the granulated sugar and continue beating until light and fluffy, about 4 minutes. Beat in the eggs one at a time until incorporated, then beat in the vanilla. Reduce the mixer speed to low and beat in the flour mixture in three batches, alternating with the milk in two batches, until just incorporated. Increase the speed to medium high and beat until smooth, about 30 seconds.
Divide the batter between the prepared pans and lightly tap each against the counter to remove any air bubbles. Bake until lightly golden and a toothpick inserted into the centers comes out clean, 30 to 35 minutes. Let cool 15 minutes in the pans, then turn out onto a rack to cool completely; discard the parchment.
Meanwhile, make the filling: Beat the cream cheese and coffee extract in a large bowl with a mixer on medium-high speed until smooth and creamy, about 1 minute. If using a stand mixer, switch to the whisk attachment. Add 1 1/2 cups heavy cream and the confectioners' sugar and beat until stiff peaks form, 2 to 3 minutes. Divide the filling between 2 small bowls (about 1 heaping cup each). Stir together the remaining 1 tablespoon heavy cream and the espresso powder in a small bowl to make a paste; fold into one bowl of filling. Fold the cocoa powder into the other bowl of filling. Refrigerate until ready to use.
Make the frosting: Beat the butter and cream cheese in a large bowl with a mixer on medium-high speed until smooth, about 2 minutes. Reduce the mixer speed to low and beat in the confectioners' sugar, 1 teaspoon coffee extract, the vanilla and salt until just combined. Increase the mixer speed to medium high and beat until fluffy, about 4 more minutes; set aside.
Make the ganache: Put the chocolate in a small bowl. Heat the heavy cream in a small saucepan until steaming, then pour over the chocolate. Let sit 5 minutes, then stir until melted and smooth. Stir in the remaining 1/2 teaspoon coffee extract; let sit until cool but still pourable, about 1 hour.
Assemble the cake: Using a long serrated knife, carefully slice each cake in half horizontally to make 2 thin layers; brush the cut sides of each cake with coffee liqueur, if desired. Put 1 cake layer cut-side up on a plate and spread with 1 heaping cup frosting. Top with another cake layer and spread the coffee filling over the top. Top with another cake layer and spread with the cocoa filling. Top with the remaining cake layer. Frost the top and side of the cake with the remaining frosting. Pour the ganache over the top and gently spread with an offset spatula, letting it drip down the side. (If the ganache is too thick to pour, microwave in 10-second intervals until smooth.) Let set about 20 minutes before slicing.