Your fish will probably enjoy eating the planaria so don't worry about those. Could be present because you feed your fish more than they can eat. Only feed as much that will be consumed within a couple of minutes.
Please explain why you think your fish are dying. What symptoms do you they have?
Can you also let us have your water stats , have you tested for Ammonia, Nitrites and Nitrates?