An example to explain the meaning of "middleman":
Imagine you're a farmer who grows vegetables. A supermarket buys these vegetables from you, distributes them, and sells them to consumers. Here, there is a chain of people/companies involved: farmer --> supermarket --> shoppers. A person/company that comes between the producer (farmer) and consumer (shopper) in this chain is a middleman. That's the supermarket, in this case.
If I, a hungry person, went straight to a market and bought my vegetables directly from the farmer, there would be no middleman. I'd be skipping the middleman.
Now onto your example:
When we eat food, it goes: table --> stomach/digestive system --> toilet. Here, the middleman is the stomach. "Middleman" is being used to mean "the link in the chain that comes between the table and the toilet".
The author is saying that people who eat too much can solve their problem by skipping the middleman, the stomach, by throwing some of their food into the toilet without eating it. The food will still end up in the same place, but the person will not overeat.
(Remember, with the word "middleman", don't read "-man" literally. A middleman can be a man, woman, group of people, company, or even an object.)
Student or Learner