Is there anyway to prevent this from happening in the future?
Yes, it can be prevented.
If you get another clown, it is strongly advised to quarantine the clown first to ensure it doesn't have this particular disease, especially since clowns are very prone to having this particular disease. When in quarantine, for prophylactic treatment (if showing no signs and just wanting to make sure it is not on the new fish prior to going into your DT) -- Treat the water column with Metronidazole 500mg per 20-40g water every 48hrs for 10-14 days...for the first few doses, go lighter to ensure the fish doesn't show signs of distress (500mg per 40g) and then ramp up to the higher concentration (500mg per 20g) for the remainder of the treatments.
But, if you have a Clown already showing signs of Brooklynella, then the following is a better and faster treatment option (since this disease usually kills in a few days):
A Freshwater dip will provide some temporary relief while you obtain the following meds... Best treatment is a 45min bath in Formulin. This medication is a carcinogen, so be careful with it. Due to this, some people will do the next best treatment of a 90min bath in Ruby Reef Rally (acriflavine). After treatment, transfer the fish to a clean quarantine tank and then run the Metronidazole treatment listed above for 10-14 days.
But right now...Sadly, if it was Brooklynella, your DT now has this disease in it and any new fish or other fish in the tank are susceptible to catching it as well. Other fish should probably be treated. To eradicate it from your DT completely (since these meds are not safe to use in a DT), all fish would need to be removed to quarantine tanks (which you would be doing anyhow to treat them) and the DT would need to remain fallow for 6 weeks to starve out the disease and let it die out naturally without any hosts to live on!