Heaves is a reaction in the lungs where the bronchiolles constrict and become inflammed and produce lots of mucous when irritants are encounter. Irritants can be pollens, dust, fungi, molds, etc--it depends on the horse as to what types of things trigger it. You are kinda right in that it is believed that allergies can trigger an attack of heaves, but heaves itself is much more than an allergic reaction--it's sorta like asthma.
So, anti-histamines may help prevent an attack, but they will NOT treat and attack. And antibiotics are completely useless for treating heaves becuase it's not an infection. Since your horse has attacks in summer, it's likely that much of what causes attacks is plant pollens. It can help to dry lot horses with this problem during the summer months, but then you also need to be sure and serve hay soaked---leave it in the water otherwise it dries out quickly and the irritants become airborne again within minutes of removing it from the water. And dampen the ground to help minimize dust in the pen.
When an attack occurs, you need to treat immediately and appropriately with bronchiodilators and steroids. The faster you treat, the fast symptoms will resolve and this reduces the risk of permanent changes in the lungs that will make the bronchiolles more constricted even when your horse isn't having an attack. Talk to your vet about keeping at least a little steroid on hand to start treating as soon as you see an attack. https://www.aaep.org/health_articles_view.php?id=320