To make custard: combine 1 1/2 cups sugar, 1/2 teaspoon salt, 1/4 cup flour, cornstarch, and 1/4 cup cocoa powder in a saucepan and mix well. In a separate bowl, whisk remaining 1/2 cup sugar into 4 beaten eggs. Pour 4 cups whole milk into saucepan and cook over medium heat, stirring constantly, until mixture begins to boil. Remove from heat and gradually pour hot milk mixture into egg mixture, whisking constantly. Add chopped chocolate and stir until chocolate melts.