The capsaicin that creates the "heat" in hot peppers does not actually create heat, of course, it just binds to our thermoreceptors that sense heat, and in so doing creates the illusion of heat. In much the same way, menthol binds to cold thermoreceptors and creates the illusion of cold. So the pepper itself cannot damage tissues.
However, spicy food can increase gastric reflux (along with tomoatoes, citrus, alcohol, caffeine, garlic and onions, chocolate, etc.), which can cause
esophagitis (sounds like this is likely your issue).
Capsaicin can do some serious damage, though, but not directly. Because it activates pain receptors as well as thermoreceptors, it can elicit severe reflex responses that can mess you up good.
https://www.usatoday.com/story/news...per-world-first-hospitalized-brain/502083002/