About ten years ago I was diagnosed with acid reflux (GERD), after having suffered it for several years preceding. (Part of the trouble was that the diagnosis depended on saying you suffered "frequent heartburn", with no definition of what was frequent. I hadn't started having more heartburn than I'd always had, so I didn't say yes to "frequent heartburn" when being asked about a diagnosis for a new problem. Turns out I've always had an amount of heartburn that they considered frequent. Nowadays they typically say "more than two to three times a week".)
At the time I went in to see a gastroenterologist who confirmed the diagnosis and then talked to me about treatment. One of the main kinds of treatment was diet changes, and the gastroenterologist made an interesting point. When the subject came up about spicy foods causing heartburn, he asked me to list some examples of spicy food. I came up with the obvious things: buffalo wings, nachos, pizza, chili, jalapeño poppers, etc. He said, notice how every one of those things you listed is loaded down with fatty cheese or cream or grease. Usually it's not the spicy peppers or hot sauce, it's that we always eat those things covered in bleu cheese dressing or sour cream or melted cheese, all of which are very fatty. That's why things that are spicy but not fatty (like some Chinese dishes) rarely cause heartburn, while things that are fatty but not spicy can cause heartburn.
This was a startling revelation for me. Sure enough, I could not think of a single thing I'd ever eaten that caused heartburn that wasn't also very fatty. And I found that adding peppers or hot sauce to non-fatty foods did not cause them to give me heartburn.
Cut to today, most of a year past my gastric bypass surgery. I've had to re-recalibrate my thinking again, because nowadays, while fat does some things to me, it doesn't cause heartburn typically. However, spicy foods do. I can't even put a couple of jalapeño rings onto something without getting heartburn.
It's no problem, though. I just take a few Rolaids with the meal and head off the heartburn before it can bother me. Rolaids aren't bad for me to take: in fact, the doctors recommend people take them every day as a calcium supplement anyway. (I used to, but I stopped after getting a kidney stone.)