The autonomic nervous system (ANS) has two main branches. One is the chill mode that is operating during times of low stress, medically called the parasympathetic nervous system (PNS - don't say that too fast, lol). The other branch is the fight or flight mode for times of high stress (called the sympathetic nervous system, SNS).
When the body switches to the stress mode it shuts down digestive functions (you can't digest your cheeseburger if you're running from a lion).
Short term, this is fine but chronic stress results in dysfunction of:
➤ pancreatic function
➤ HCl production
Be kind to your pooper and manage your stress :)