I feel for you, it can really get you down. Constipation alone can make you feel so sluggish and generally miserable. It is an ongoing situation for me that I have learned to manage, it is not cured iyswim.
It might be worth getting your TSH levels checked. Whenever my TSH level slips to the higher end of the normal range the first thing I notice is sluggish digestion and when it's nearer to 1 or below it speeds up and my insides work much better.
For immediate relief I would take a glycerine suppository (available off the shelf at any chemist or even Tesco). Moisten the suppository with warm water then insert as high up as you can then lie down on your back on the floor with knees up (sorry if TMI) near the loo and read a book for 15 minutes or so. These were recommended to me by my consultant so fine to use when required.
I suggest you start taking pre and pro biotics daily, along with the Magnesium Citrate. Linseeds really do help. I just throw a teaspoonful in my mouth and immediately drink a glass of water to get them down. It really is worth it. You can see them come out the other end and they have lubricated everything all the way through.
Do buy some Movicol though go easy on that as it probably will give you the runs. I don't use it any more as can manage without but was prescribed it when I was under the Consultant and it did help when I was blocked.
Daily every evening after my meal I now take:
2 x 400mg Magnesium Citrate
1 high strength pro & Prebiotic (sometimes 2).
1 or 2 Quest Digestive Enzymes.
1 DulcoEase - you can take more but 1 seems to be enough when things are under control.
Gluten free porridge with linseeds and dried prunes every morning. I am sick of it but soon suffer if I stop taking it. I make it with boiling water from the kettle, not milk.
Generous helpings of fresh vegetables and also apples.
I still take a suppository from time to time when needed - maybe every 3 or 4 weeks, sometimes longer. Rarely now 2 Senokot if things seem to have slowed down. The main goal is to avoid a blockage and I will do anything to keep things going. I don't want repeat surgery! The stuff you read about constipation not being serious was not true for me. Unresolved constipation can have serious consequences. They say that to stop people taking things like Senokot in too high doses (laxative abuse, like in an eating disorder) as they say it causes dependency. I researched that In depth and actually, it doesn't cause dependency so used in moderation it is fine.
The usual recommendation of Allbran and similar don't work for slow transit constipation. They just bulk things up but don't move them along so can cause more problems than they solve. Fibogel can help as long as you are also using something to speed digestion, like Magnesium Citrate and also exercise.
Sorry for all the detail but I do feel for you.