Add the egg yolks, granulated sugar, and brown sugar to a large bowl. Whisk vigorously or mix with an electric mixer until light and fluffy.
In a medium saucepan, add the whole milk, instant espresso powder, cocoa powder, and salt. Heat to a gentle simmer, but do not boil.
Slowly pour the warm milk into the egg yolk mixture while whisking or mixing with an electric mixer so the yolks don't curdle.
Add everything back in the saucepan and place over medium-low heat. Cook, stirring constantly, until the temperature reaches 170°F on a digital instant thermometer*. Make sure you are stirring the entire time or it may curdle.
Strain the custard through a sieve and into a bowl. Cover the surface with plastic wrap and allow to cool completely in the fridge for at least 1 hour or overnight*. To speed up cooling time, vigorously whisk the custard or beat with an electric mixer to get rid of the heat, and place the bowl over an ice bath.
Add the cold heavy whipping cream to a large bowl and use an electric mixer to beat until thick and fluffy. Fold the whipped cream into the cooled custard.
If making with an ice cream maker: Churn the ice cream as instructed by your ice cream maker until thick with a consistency of soft serve. Add any toppings, if desired, and churn until evenly distributed. Transfer the ice cream to a bowl or a 9 x 5" loaf pan and cover the top with plastic wrap. Freeze for 1-3 hours or until frozen to your desired consistency.
If making without an ice cream maker: Add any toppings, if desired, and transfer the ice cream to a bowl or a 9 x5" loaf pan. Cover with plastic wrap and press the plastic wrap to the surface of the ice cream to prevent ice crystals from forming. Freeze for 6 hours or overnight.