You can go a long way just by making sure your ear canals are dry after swimming. The alcohol/whatever mix drops can help with that, as well as just running a hair dryer on low toward your ear (and hold your ear open so it gets in there). I used to get them a lot, but since I do the hair dryer thing (and cotton swabs), I’ve never had one.