Yep. A healthy intestinal biome is also necessary for a healthy, responsive immune system. The brain, too, is affected by intestinal bacteria. Too many of the bad ones leads to psychological problems. In fact, diet has been used to treat everything from ADHD/autism to epilepsy and MS.
certain statins that can penetrate the brain blood barrier can break down the cholesterol in the brain and cause dementia and other cognitive problems. So be careful with them. If anyone is on statins be on guard for brain problems.