Set the oven to 350°F to prepare the cookie crust. Pulse chocolate sandwich cookies into fine bits using a food processor. Pulse one more after adding the sugar and melting butter. Grease a 9-inch pie pan with crumbs, then push the crumbs up the edges and onto the bottom of the plate with your hands. Pie crust should be baked for ten minutes, then allowed to cool while preparing filling.
To make the chocolate pudding filling, combine the milk and sugar in a medium-sized pot and cook over medium heat. Give the mixture a 5-minute simmer to ensure the sugar dissolves and the fluid becomes heated. Meanwhile, combine the egg yolks, cornstarch, and espresso powder in a medium-sized bowl. To properly blend, give this mixture a good stir.
Temper the mixture of egg yolks: Whisk together the egg yolk mixture after adding about two tablespoons of the heated milk mixture. In order to avoid cooking the eggs, this method gradually adds the egg yolks to the heated milk. Next, gently transfer the combination of egg yolks into the sauce pan.
Lower the heat to the lowest setting and stir the pudding regularly until it starts to thicken and bubble on the surface. When everything has melted and you start to see chocolate pudding develop, add the chopped chocolate and cubed butter and mix again. Take the pudding off of the stove, whisk in the vanilla extract, and stir again to mix.
Pie assembly: Fill the chilled cookie crust with chocolate pudding. If necessary, use an offset spatula to smooth the pie's top. For optimal results, let the pie set in the refrigerator for at least four to five hours, or overnight, covered loosely with plastic wrap.
Pie topping, garnishing, and serving: After the pie has firmed, spread or spoon the cool whip or whipped cream on top. Garnish with chocolate curls or shavings and mint leaves, if preferred. Slice with extreme caution using a sharp knife, then proceed to serve. Have fun!