Hot espresso poured into a cold cup - is that dangerous?
There are frequently conflicting opinions about coffee preparation, as everyone has their own way that they like it best. Keep in mind that these are just opinions though and you should prepare the drink however it most appeals to you. 

That said, there are a few things to keep in mind: If you're using solid chocolate or cocoa powder, you'd want to add hot liquid directly to that to melt it. Most flavorings will dissolve best in hot liquid, but syrups can be stirred in to cold liquids as well. The main thing you'd want to avoid is pouring hot liquid directly over ice, as that will water down your coffee a lot. Generally my method is to pour the espresso over the syrup, swirl it to dissolve, add cold milk, then add ice last. If I'm making an iced Americano, I do add the espresso directly to ice and then omit adding water (or reduce the water).