Plants and aquarifish need clean water to live. So does the coral reef. So the idea is to ?filter water for contaminants using solar power and some reverse osmosis like process. Continuously reinsert cleaned water to the coral reef surrounding to battle the speed of contamination.
Perhaps contamination could be slowed down by some smart enclosure of some size? But this is more complex I guess. Maybe some algorithmic enclosure where you have a machine learned algorithm to control water in and out transfer could help.