In a medium saucepan, whisk together the granulated sugar, Dutch-processed cocoa, cornstarch, espresso powder, and salt.
Add the three large egg yolks to the saucepan and whisk them into the dry ingredients until well combined.
Gradually pour in the whole milk and heavy cream, whisking continuously until smooth.
Place the saucepan over medium heat and continue to whisk the mixture as it heats.
Cook until the mixture thickens, about 5-7 minutes, until it coats the back of a spoon.
Remove from heat and stir in the chopped bittersweet chocolate and unsalted butter until melted.
Stir in the vanilla extract.
Optionally, pour through a fine mesh strainer into a clean bowl to remove lumps.
Cover with plastic wrap, pressing directly onto the surface, and chill for at least 2 hours before serving.