I have had some success with helping a hedgie with constipation. I fed her cooked pumpkin or butternut squash- 1/2 a teaspoon daily - mixed well into wet cat food( a fish flavoured one seems to conceal the taste of she is picky)
This is just to get things moving. I suggest feeding pumpkin 3 times a week once she is more comfortable. The veg isn’t broken down and acts as bulk while retaining its own moisture. Insect chitin is also “ roughage” but doesn’t retain moisture and can just become impacted in a sluggish bowel.
I boil pumpkin/ squash in unsalted water and fill ice cube trays. It’s great to keep some on hand for emergencies. Canned pumpkin is good too- just look out for Any added salt or sugar.
Pumpkin can also soothe an irritable gut and helps with diarroea .
Hope your hedgie feels better soon.