In a larger saucepan, whisk sugar and cocoa together. Slowly add water, stirring to blend water and sugar/cocoa mix. Add corn syrup and stir.
Bring to a boil (watch carefully as this can boil over very easily) whisking frequently. Turn down to a simmer and reduce sauce until slightly thickened, just a minute or two. Cool slightly and add the vanilla and salt. (The sauce will thicken as it comes to room temperature and more as is cools to refrigerator temperature.)
Sauce can be stored in a jar or a squeeze bottle. If using a plastic squeeze bottle, mixture should be cooled to room temperature before adding.
Slightly adapted from Alton Brown, although amazingly close to my Mother’s recipe; it may be a passed around legacy recipe.
Find it online: https://frugalhausfrau.com/2014/03/05/intensely-chocolate-syrup/