I'll add onto what Art said....be careful if/when medicating a tank that has loaches and other scaleless fishes, many medicines are harmful to them. Your best bet is to quarantine them beforehand and then just be careful with your tank. In a healthy planted tank fish rarely get sick.
I think the best defense against ick is a properly functioning heater. As long as the tank stays at a stable temperature they should be okay. The only time I have had to deal with ick is when I either didnt have a heater or it wasnt working correctly and the tank got cold at night and warmed during the day. The temp fluctuations stress the fish and make them more susceptible I believe.