The precipitates are a result of the magnesium from the Epsom salts replacing the sodium or potassium in the soap, leading to (in your case) likely magnesium cocoate and sodium sulfate. Magnesium cocoate, tallowate, stearate... etc. are not soluble, so they precipitate out. There is nothing you can do to prevent this with these ingredients - it's the same as trying to find a way to mix baking soda and vinegar and not release carbon dioxide bubbles.
As Susie noted it is not hazardous, but it is a mess to clean up because the precipitate is insoluble.
If you want to have a similar effect without the reaction you can use a sodium compound. A couple tablespoons of baking soda per quart can work as long as you watch things, as holding on to high strength sodium chloride or bicarbonate solutions for too long (don't have times, but probably over an hour) can potentially lead to hypernatremia (too much sodium being absorbed). Reports I have seen have been for 1/4+ cups of baking soda retained for several hours in a older patient that wasn't in good health.
Another option that wouldn't absorb as much would be to use sodium phosphate. Easiest way would be to pour a Fleet-type enema or two in the bag. Again you don't want to hold onto it for more than about an hour, especially if you are not in good health.
Alternative 3, which would be safe for long holds but not as powerful, would be to use baby shampoo instead of soap.
Alternative 4, which is inconvenient but would be very powerful, would be to use docusate sodium in the enema. Recipes tossed around on here have up to 2 gms per liter or thereabout, which is just about the definition of "ass kicking"