I avoid foods that have a lot of insoluble fiber - sweet potatoes contributed to a partial obstruction and haven't had one since. Based on extensive reading of this site I do not eat mushrooms any more.
I always peel fruits and peel and cook vegetables, usually well cut up.
I eat mostly whole, unprocessed or minimally processed foods. I limit sugar and white flour. (Real) maple syrup helps keep my sweet tooth satisfied.
Occasional wine in limited amounts is all the alcohol I consume.
Must haves: kimchi! I make my own. Excellent probiotic properties. A little bit makes my gut very happy. Sourdough bread. I bake my own. I love bread and the ferment breaks down the sugar in wheat flour that is otherwise hard to digest. Sourdough pizza dough, also. Rolled or quick cooking oats- the insoluble fiber in oatmeal helps to regulate stool consistency for me. As does freshly popped corn, huskless varieties. And nut butters of all sorts (unsweetened) seem to slow output.
Corn. I love it. Early on I made corn butter - labor intensive to blend, sieve and heat to thicken, but got me through the first two years of no fresh corn. I can have a bit fresh now, but cut it off the cob, splitting the kernels to give me a head start on chewing and digesting. And I am a heavy user of cornmeal in baking.