Most people I have known who had stomach issues around coffee had them resolve by switching to espresso, or espresso based drinks(if making at home pump based machine, or manual I suppose but not steam). I'm definitely in that boat.
Tea on the other hand starts ripping my stomach apart after a day. YMMV.