I don’t think they’re particularly harmful besides what was mentioned earlier. I had a planarian with outbreak when I was running my red bellied piranha tank. After I became more meticulous with cleaning schedules and food item selection, I got them under control. From my knowledge, they’re a product of too much detritus and uneaten/decaying food.