Like, with the wierd constipation cures involving drinking mercury or eating heavy metals, why was it such a problem needing a solution? I assume it has something to do with diet?
I'm curious why you think that constipation was a huge issue prior to the 20th century. I mean, it may have been -- but it wasn't something that doctors were terribly worried about. Herbal laxatives have been well known since antiquity (in fact, one of them -- the Senna app -- is still one of the most commonly used laxatives in the United States). And at least since the 16th century in Europe (and likely earlier), there were any number of providers who would easily supply these.
Given the context of your question, though (drinking mercury/eating "heavy metals") I suspect that you're referring to the widespread use of purgatives in traditional Western medicine, which had nothing to do with constipation and everything to do with treating disease. Traditional Western medicine is based on the idea of the four humors -- blood, phlegm, black bile, yellow bile. Health comes from their balance in the body, disease comes from their imbalance. Traditional Galenic medicine sought to balance these out -- mostly by diet and lifestyle, but in disease, by purging the excess humors. This is the rationale for bloodletting, and also the use of laxatives and purgatives. Mercury, or quicksilver, was a traditional purgative, especially in the form of calomel (mercury chloride). The other heavy metals comes from Paracelcus, the first major challenger to traditional Western medicine. His followers believed (and I'm dramatically simplifying here) that disease lay in the individual organs, rather than a balance of fluid. By using chemicals, doctors could target individual diseases. Paracelsus' use of heavy metals would remain influential (and in fact led to some of the first effective anti-infective agents in the early 20th century), but his theory of disease ultimately died out.
I think the public imagination of dramatic laxatives and enemas mostly comes from the 19th century. By this time, the intellectual basis of the four humors had largely disappeared, but old treatments still remained. This was the time of "Heroic" medicine, and doctors like Broussais and Benjamin Rush would describe HUGE doses of both bloodletting and purgatives; Rush called calomel the "Samson of medicine."
So I think this gets to your question -- people likely were not horrifically constipated (given the poor food quality, likely quite the opposite), but laxatives and purgatives were frequently used in the treatment of disease. It took really until germ theory for this to truly die out.
Let me know if there's a specific text that had mentioned constipation.
Finally, I want to add that calomel actually IS incredibly effective at causing vomiting and diarrhea -- and many chemotherapeutic agents were derived from heavy metals (which are effective, other than killing quickly reproducing cells, at causing vomiting and diarrhea). So they actually work!