I think you just answered your question here. Stress messes with digestion, add that to foods that probably don't agree with you in the first place and bam, you got a positive feedback loop of issues. A lot of the "bro" foods like broccoli or oatmeal cause lots of issues in people as the fiber is difficult to break down. Processed foods will also mess things up, preservatives slow down digestion and will back you up. I've personally gone so far as to baking my own bread to get away from any store bought junk. My rule generally speaking is if it lasts longer than 4-5 days, it doesn't belong in my body.
I decided to try vegan protein powder at one point, it gave me HORRENDOUS heartburn, absolute torture that continued for a while after using it. Never again. It was the Kaizen brand.