In your saucepan, mix together ¼ cup of the milk and the cornstarch together until well-combined.
Add in another ¼ cup of the milk and whisk well.
Mix in the salt and cocoa powder and mix until well-combined.
Mix in the sugar, egg, and yolks. Whisk until very well-combined.
Slowly add in the remaining milk and heavy cream and mix until well-combined.
Heat on medium and mix continuously until thickened until it coats the back of a wooden spoon and leaves a line when you run a finger down the back of the spoon.
Turn off the heat. Place the chocolate, butter, and vanilla in a container and strain the pudding through a fine mesh strainer into the container with the chocolate. Allow it to sit for a minute, then mix until the chocolate and butter are melted and fully incorporated.
Place plastic wrap over the pudding so that the wrap is touching the pudding. Place in the refrigerator and chill for at least four hours, preferably overnight.