★★★★★
Small amounts of magnesium, even taking a larger dosage from time to time, but not every day, might be helpful.
Herbal remedies for constipation containing senna or other stimulant herbs stop working eventually. First, there is a need for higher and higher dosages and then even the higher dosages hardly work. Even taking high amounts of magnesium products like magnesium citrate over a long time (a year or so) will end up hardly working. And the body's natural peristalsis is damaged. Miralax is less habit forming, but it can cause nervousness (or anxiety or sleeplessness) in some people.
Fiber foods taken with a lot of water are helpful.
(There is an antibiotic - Erythromycin that has been shown to help severe constipation in children. https://www.scielo.br/j/bjmbr/a/NGMt3N7mkbn49xnzYB8mYYS/)
Avoiding/minimizing fried foods, too much protein, and refined and processed foods is important.