When you activate this card, if the opponent activates an effect in a chain that destroys the targeted Spell or Trap Card, the opponent will not take the 500 points of damage. If your opponent merely chains the Spell or Trap card that you targeted, the Spell or Trap Card will be destroyed when “Stamping Destruction” resolves and your opponent will take 500 points of damage. (Remember that Spell and Trap Cards remain on the field until the entire chain resolves, unless destroyed by a card effect during the chain.)
If your opponent destroys all the Dragon-Type monsters on your side of the field as a chain to the activation of this card, this card will still resolve since the conditions were met at the time of activation.