Hey brother, i have a similar kind o f situation and i will tell you what i did and how it basically changed my life (not even being dramatic).
So ever since i was about 16 (about 8 years ago) I developed terrible stomach and heart burn like pains. Being young and not really knowing what was going on, i went about ignoring it, eating shitty foods making it worse, choked down tums and zantac, and nothing really helped. Even when i started clean eating,
Anyway a few months ago after literally dealing with this for years and even doctors not helping, i began to research natural ways to cure damaged organs and stomach lining and helping aid in getting everything back to normal.
So 1, i started weeding out the foods that i would react to. Like the guys above said it was kind of unique to them, mine was most starchy carbs, and some obvious things like spicy foods, alcohol, etc. The next step i took was starting to incorporate fermented vegetables and fruit juices into my diet and rotate them around, and within weeks my problems started to fade. When i say i couldnt sleep on my side from pain i mean it and now it doesn't bother me in the least.
So basically a long winded way to explain that what i did worked for me, cause its kind of odd. Started drinking apple cider vinegar, 1-2 table spoons in a glass of water before breakfast and before dinner or post work out. Next thing in make a batch of fermented cabbage juice. It does not taste good, but its easy to make. Drink a jar over the course of a few days, for two weeks. take the apple cider vinegar down to once a day, and then every other day, and slowly fade it out. I alos strongly recommend uping green tea, yogurt, and if possible find a place that sells Kombucha which is a fermented green tea drink. My friend makes his own so i get it from there but i know places sell it. This worked for me and i bet it would help you. Sorry for the super long response lol