When I got tapeworms for the first time, I felt the same way. You're not alone! I think I brought some onto my property by feeding them dried mealworms, but I also was have trouble with sawtoothed beetles in my feed.
What is most important to know about tapeworms is that they cannot complete their lifecycle inside your chickens. The tapeworms will make eggs and then shed pieces of themselves (asexual reproduction). These pieces come out in their poop and are covered in microscopic eggs. These tapeworm pieces don't survive long outside the body. Their goal is to move alot and get eaten by their invertebrate host. Each type of tapeworm has a specific invertebrate host for their egg and early stages and a specific vertebrate host for their adult stages. If they are eaten by the wrong species of invertebrate or vertebrate host then they die. If you can prevent the tapeworms from entering the right invertebrate host, then you can break their lifecycle.
Their are several types of tapeworms that chickens can get, but the most common type is spread by flies and grain feeding beetles. Keep your coop very dry. I made the mistake of washing out my chicken house with a hose and disinfecting. Moist poop, feed and bedding attracts flies. When poop, feed or bedding stay moist for a few days they become a breeding ground for bacteria. Flies will lay their eggs in these materials and their maggots will eat the bacteria. If they consume tapeworm eggs during this time, the tapeworms will hatch inside of the maggots. Then if the chickens eat the maggots, you will end up with tapeworms in your chickens.
Changes I made:
-Stopped using liquids to wash my chicken house.
-Switched to a scrapping board, instead of bedding.
-Covered run, to prevent moisture from rain.
-Regular poop cleanup in run
-Started using trashcan type feed dispensers (reduced feed contamination from poop or moisture)
-I used a fly eliminator program with arbico organics (released small parasitic wasps that kill maggots)
-I regularly give my chickens pumpkin, cantaloupe and watermelon seeds. I also give them daily access to brassicas. I figure this helps make their bodies less inhabitable.
-I keep changing the type of dewormer that I use for tapeworms in order to reduce the chance of their becoming resistant to any particular product.
-I stopped feeding mealworms to my chickens, and started checking feed that I bring in for bugs and storing in airtight containers.
-I learned how to identify tapeworm eggs under the microscope (You just put a tapeworm segment on a slide with a little water and you can see the eggs attached).
I had to pay for access, but this is the article I use to ID tapeworm eggs.
https://www.jstor.org/stable/1587721