What you are describing can be due to a partial obstruction of either large or small intestine.
Most people with problems like yours have an upper and lower GI scope, then a gastric emptying test with a check of the gallbladder. These all show clear except delayed stomach emptying. Sometimes liquids will empty quicker that solid food. They call it Idiopathic gastroparesis, does this sound like you?
Most people with this problem have slow motility, but can have explosive BM s. They also have abdominal bloating that seems extreme.
Due you know if you have hypochlorhydria (low stomach acid). They may have tested with your other tests? Or you do the at home stomach acid test with baking soda and water (ask Google).
Have you consider you could have tapeworm? They often cause Gastroparesis and partial obstrustions. They also cause bloating, constipation as well IBS-D. But if you also have low stomach acid there is a good possibility it is a Tapeworm
or other large intestinal worm.
The thing you found in the toilet, could be a Tapeworm
segment, they break off in sections similar to what you have in the photo.