Chop the chocolate finely (the smaller the better) place in a large bowl and set aside.
Whisk the sugar into the eggs and set aside.
Combine the milk, cream, cocoa, and instant espresso (if using) in a saucepan and place over medium heat. Warm until just simmering (it should be just a little too hot to touch)
Temper the eggs: SLOWLY whisk a little of the hot milk mixture into the eggs. Constantly whisk in a little at a time until at least half of the hot milk is mixed in. The key is to start slowly so the eggs gradually warm up otherwise if it’s all dumped in at once you’ll end up with scrambled eggs. Put the warmed eggs into the saucepan with the remaining milk mixture.
Return to medium-high heat and slowly bring to a simmer while whisking, 8-10 minutes. The custard is done when it coats the back of a spoon. Pour through a fine-mesh strainer into the bowl with the chopped chocolate. Let it sit for 5-10 minutes to allow the chocolate to melt then stir, making sure all the chocolate is thoroughly incorporated.
After the ice cream has cooled, refrigerate for 4-12 hours.
Give the ice cream a stir (it will be very thick) and add in salt to taste. Process in an ice-cream maker according to the manufacturer’s instructions.
When it reaches the consistency of soft-serve ice cream (about 20-30 minutes on most machines) scoop into a container, place a piece of plastic wrap or parchment paper on the surface and freeze until firm (4 hours minimum)