I began IBS in my 20s and though it changed over the years it was lower bowel and discomfort and bloating more than pain for 20 yrs. Then in my late 40s I had upper gut pain diagnosed with gastritis and duodenitis via endoscopy. I took PPIs for 2 yrs but wanted to get off them, and my stomach was beginning to feel a mess.
I tried cutting gluten and dairy and most sugar in my early 50s with some success, but slid back on to the old diet. In my 50s I got diagnosed with ME/CFS on top of being hypothyroid, and after a relapse 3 yrs ago my gut really deteriorated badly with acid reflux and periodic pain in the middle area.
So.... for what has worked since. First a Paleo diet, but I introduced it very slowly and reluctantly. Now I just have a little rice and quinoa, and I do also eat hummus. I am able to eat goat or sheep milk kefir and yogurt. Otherwise its meat, fish, veg, (lots of green leaves, often 3 times a day), seeds and nuts mostly. I can have a little fruit too, but only a little. I have as a by product lost a stone in weight this summer and am back to the weight I was 10 yrs ago at last. I am now 61.
I tried various probiotics but had trouble with some and settled on a soil based one for a while, Prescript Assist but v expensive. Also tried Symprove for a bit too. Now I am able to have goat milk kefir mostly.
I use Betaine HCL and digestive enzymes too.
I can't say it's mended yet, but hopefully getting there. I really find the food thing hard especially when out anywhere, but I am having spells when it feels OK at least. If I am fragile in energy though, or have an immune dysfunction going on then it gets worse. I find it very hard introducing any new foods in too, as so often it can tip over but I am better at getting it stabilised now.
Edit note: forgot to say, I also use Lepicol which I have found to be very useful for any constipation issues. It has probiotics in it as well as a couple of other useful ingredients, and doesn't cause me any adverse issues. Of course many people have diarrhoea rather than constipation, and I used to have spells of it too, but don't get that now.