How big are they now? Sounds and looks like it could be coccidiosis. Dirty and wet conditions cause the coccidia in their poo to multiply and when they pick stuff off the ground they are ingesting more than their bodies can handle. Separating them into groups was a good idea, it may help prevent the spread among the others. If you can find the ones that are sick it wouldn’t be a bad idea to just process them early.
Move the healthy ones to a cleaner area and if you have a mobile tractor move them twice daily so they aren’t sitting in their own filth. The drier area the better. If you can’t move them I’d be tossing bedding in like confetti to help keep them dry and clean. Shavings and even wood chips are a good bedding. Straw works too but it isn’t super absorbent.
I’ve never had to treat cocci but I don’t think I’d really want to treat table birds, at least not when they are so close to processing age. IMO better to just cull the sick ones to prevent the spread of it, but of course if one has it they likely all do.
If you decide to treat them, I hear Corid is the usual go-to med.