The substrate change didn't do your remaining fish any good to be sure but considering the information you provided, I think it's a combination of events.
's cannot actually rid a tank of C. irritans
or many other common parasites. Only offer a measure of control dependant on the actual set up of the unit and regular maintenance. In this case, I would actually suggest the UV
was merely keeping a balance between the parasite problem and the fish. The UV
doesn't actually break the life cycle, merely kills off some
of the parsites during the free swimming stage. It only takes one to keep the life cycle going. Depending on the affliction, each parasite can release 250+ new parasites after it's reproductive stage. Kinda like playing roulette if you ask me.
The best course of action will always be removing the fish from the affected system and treating accordingly. Only after a proper fallow period can you be permanently rid of future infestations providing proper quarantine is adhered to with all future additions. The common belief that parasites of this nature are "always present"
is a complete myth
perpetuated by hobbyests. It is more than possible and quite easy to maintain a parasite free tank given the right measures are taken with each new addition.
As far as your tank is concerned I can only guess at what the problem was but it sounds like you where battling two or more. C. irritans
is one possibility but I also suspect Uronema.