Line an 8-inch or 9-inch square baking pan with aluminum foil, ensuring the foil extends over the edges for easy removal, and lightly grease the foil with butter.
In a heavy 4-quart saucepan, stir together the granulated sugar, cocoa powder, and salt until the dry ingredients are thoroughly combined.
Gradually stir in the milk until the mixture is smooth and the cocoa is well incorporated.
Place the saucepan over medium heat and stir constantly until the mixture reaches a full rolling boil.
Stop stirring immediately once the boil is reached. Attach a candy thermometer to the side of the pan, making sure the bulb does not touch the bottom.
Boil the mixture without stirring until the thermometer reaches exactly 234°F (112°C), which is the soft-ball stage.
Remove the pan from the heat instantly. Add the butter and the alcohol-free vanilla flavoring to the surface, but do not stir them into the mixture.
Allow the fudge to cool undisturbed at room temperature until the thermometer reaches 110°F (lukewarm). This phase is critical for a smooth texture.
Beat the mixture vigorously by hand with a wooden spoon for approximately 5 to 7 minutes. Watch for the texture to thicken and the appearance to change from glossy to matte.
As soon as the fudge loses its gloss, quickly spread it into the prepared pan. Let it sit at room temperature for at least 2 hours until firm before lifting the foil and slicing into 36 squares.