A castle in London had the shitt*rs located in a small room with your back to the exterior castle wall. A hole went through that wall to the exterior. When one felt the urge to purge they would be sending the steaming plopper sliding down the exterior ediface. How unsavory.
This is what the castle moat was for. It was an open cesspool.
I viewed one castle that did things right...wish I could remember the one. The toilet on the top floor fed directly into a long tunnel that dumped waste directly into the ocean. Best result I could think of before flush toilets.