The dark sludge that clogs drain pipes is corrosion. It's an indication that something in your water isn't clean, which might be caused by having too many minerals in it. If you have a broken well pump, then the corrosion could get into your piping and cause problems there. You should call a plumber to inspect it if there's any significant build-up.