DWR D spelled out the helpful steps. I bring dried apricots (less water weight than prunes) and some packets of Metamucil Fiber Thins – which are chocolate-flavored wafer / cookies that provide fiber and some calories. They’re available in a box of individually sealed 2-wafer packets making it very convenient. Maybe one packet a day is enough for you, or maybe one in the morning and one at dinner is what you need.
I also transition from normal around-town food to full on backpacking food over a day or two. A wrap or even a salad is fine for the first and/or second day. It may have a bit more water weight but those first meals are carried the shortest distance and so accrue fewer pound-miles of work.
If you have more whole grain in your diet, things will keep moving. I did one week in NZ with a bunch of vegetarians so it was lot of dehydrated beans, brown rice, veggies, etc and I was pooping a like a rabbit (or moose, in winter) with small turdlets that came out easily and needed almost no toilet for wiping myself.  Versus some cheap, quick, and fuel-savings options like Ramen or instant mashed potatoes – those will leave you more constipated.
There can also be a big mental component to constipation. Classic Boy Scout behavior is unconsciously, they are anxious enough about using the outhouse or digging and using a cathole, that they hold it in all weekend only pooping when they get to regular toilets at a Burger King or back home.
As my technical editor’s coffee mug asks, “Is Anal Retentive hyphenated?”