Epsom Salts , although mainly magnesium, will cause a reduction in magnesium because of the laxative action on the colon.
Dehydration may cause general achy muscles but it would be very unusual for it to be concentrated on one shoulder.
You can try a flush without the Epsom Salts to see if you still get the problem.
My opinion is that the liver gallbladder or pancreas is causing the pain and the only way you will get rid of it is by keep flushing until your restore the full function of your biliary system