I'm by no means an expert but I too had similar things come out in my journey to health and I looked around and perhaps they are Ascaris roundworm. The reason they are so "beat up" is because the digestive juices hurt them as they exited.
Hopefully someone with A LOT OF knowledge will reply so we all know.