I'm not sure about the second round of mash, but when treating gapeworm or capillary worms with the five day treatment at full strength no repeat is needed after the five day run.
For getting rid of them in the environment, it's nearly impossible. Most of the species eggs (they have a very tough coating/shell) are very resistant to chemicals of all kinds, the meds kill the worms but not the eggs, which is why one treatment dose isn't enough, the treatments kill the worms in the birds, so repeat treatments are needed to get the eggs that continue to hatch, until they are all gotten. Burning the ground will work, but it's not really doable for most set ups (this is why in rural agricultural areas field burning is common every year). Rotating pastures/ground can help, but again for many that isn't doable either because of space or structures that can't move. So keep droppings cleaned up as well as you can, keep bedding and shavings etc as dry as possible. Deep litter works, but only if it stays dry. In an open run that gets wet a lot or stays wet, it will be a stinky mess. To truly control worms when they are in your environment the best way to deal with it is to worm regularly. Roundworm eggs can survive 10 years in laboratory conditions, and at least several years in even very harsh winter environments. If you worm monthly for several years, you may be able to get rid of them, or reduce the load. But every time a bird gets infected they shed 1000's of eggs in their droppings into the environment again. And wild birds can bring them in too the same way. I would just keep things as clean as you reasonably can without making yourself crazy, use feeders to discourage them eating off the ground (you will never stop them scratching around and finding things), keep feeders and waterers clean, and worm regularly for the type and load you have. Some people can do once or twice a year and that's enough, some will have to do more often, every flock and every environment is different. For some worms, like tapeworm, an intermediary host (cockroaches, earthworms, slugs, etc) is needed, so getting rid of, or reducing, the numbers of that host can help.