Even easier method: Only use 2 c milk, HALF the sugar and HALF the cocoa.
Just bring milk and sugar to almost boil, take off the heat, whisk in cocoa,cornstarch & couple of tsp reserved sugar, after whisking smooth in a 2-cup measuring cup with 1/2 cup milk left in the bottom. Bring to boil, constantly stirring, cook for about 2-3 min. till thickened.
No need to fuss with the egg either.
That's the way my mother made it when I was a child in Germany 60+ years ago :) Have made it this way ever since.