Place all 6 egg yolks in a medium mixing bowl and set aside.
Add the cocoa powder, espresso powder, salt, and half of the sugar into a medium pot. Whisk to combine.
Pour in the milk and heavy cream and whisk again.
Place the pot over medium heat, stirring frequently to prevent burning until it is steaming. While it heats up, add the remaining sugar into the bowl with the egg yolks and whisk to combine.
Set the bowl with the egg yolks and sugar on a damp cloth. This will keep it from spinning when you whisk it.
Once the milk mixture is steaming and the dry ingredients have fully mixed in, remove it from the heat and set it next to the bowl with the egg yolks.
While whisking the egg yolks constantly, use a ladle to slowly drizzle the hot milk mixture into the egg yolks. Don't stop whisking, this is called tempering the eggs and it helps prevent them from curdling.
Add about 1 cup of the milk mixture into the egg yolks. Then switch to whisking the remaining milk mixture in the pot and slowly pouring in the tempered eggs.
Return the pot to the stove and cook over low or medium low heat. Stir constantly with a rubber spatula, alternating between a figure 8 pattern and scraping the sides of the pot.
Continue cooking and stirring until the surface bubbles have disappeared and the mixture has thickened. Once both have occurred remove the pot from the heat. Pour it through the fine mesh sieve into the bowl with the chopped chocolate.
Remove the sieve and leave the mixture to sit for 1 minute before whisking to combine. Then whisk in the vanilla extract.
Place a sheet of plastic wrap onto the surface of the custard and allow it to come to room temperature before storing in the fridge overnight to cool completely.
Make sure any parts of your ice cream maker that need to be frozen are in your freezer as well.