Yikes, large amounts of magnesium is what one takes to prepare for a colonoscopy
My wife and I take about 500mg of magnesium in our daily drinking water bottles - which is excellent to keep one’s digestion system running smoothly without the carbs - but too much magnesium does NOT produce a happy ending.
So glad you’ve managed to identify some of what’s been happening.