Could be coeliac x
She wrote a book called "Healthy Kids, Happy Kids" which is really infomative and has really helped me come up with strategies to try and get to the bottom of my son's issues. I highly recommend it! She's done lots of podcast etc as well so I'm sure you can search for her name and will come across plenty of resources. I am giving my son probiotics, hoping to get him eating fermented foods, lots of good sources of Fibre, cutting out processed food and looking at specific mineral supplements (like zinc and magnesium). It is early days but really hoping it makes a difference! Hope this is a little helpful, do check out Dr Song or just do research on the gut microbiome as it may help your little ones situation. Here's hoping!
If you've noticed gluten is a problem for you since giving birth, might be worth checking your symptoms on the Coeliac UK website. If you have the gene it can be triggered by birth, and there is also 1-in 10 chance for a child or siblings to have it if confirmed. Worth ruling out at least.
Sorry to hear your little one is suffering with constipation and divestige issues. I've had the same with my son for years now too. It's really frustrating as I am also trying to get to the bottom of the cause but having a hard time. My son has allergies and have had the opportunity to test if he is allergic to gluten and it turns out he isn't. We have taken him off lactose which has helped his reflux issues at least. But constipation is still ongoing. We have also been told to do daily Movicol but as in your case that doesn't seem to take care of the root cause. We have been seen by pediatricians but have been given pretty much the same advice - use Movicol, improve Fibre intake, drink lots of water. But this hasn't really made much of a difference. I am now actively trying to improve his gut health (microbiome). I came across an integrative pediatrician called Dr Elisa Song who talks a lot about the importance of gut health on overall wellbeing in kids...