In a medium saucepan over medium heat, melt the butter. Continue cooking, stirring frequently, until the butter foams and turns lightly golden with a nutty aroma.
Add the heavy cream, light corn syrup, granulated sugar, brown sugar, and espresso powder if using. Whisk until combined and heat until the mixture is hot and the sugars have dissolved.
Whisk in the cocoa powder while the mixture is hot to help bloom the cocoa and deepen the chocolate flavor.
Bring the mixture to a gentle simmer and cook for 3–5 minutes, whisking occasionally, until slightly thickened.
Remove the saucepan from heat and add the chopped dark chocolate. Let sit for 1–2 minutes, then whisk until fully melted and smooth.
Stir in the vanilla bean paste and salt until fully incorporated.
Let the sauce rest for 5 minutes, then whisk once more to fully emulsify the butter and chocolate.
Serve warm over ice cream, brownies, pancakes, waffles, or your favorite desserts.