It is very common in dogs, usually due to some irritation to the ears, which is usually an ear infection but can be something like an insect bite. The blood will keep filling the ears until the broken blood vessels have a chance to seal up, ie the head shaking/scratching is reduced by trying to deal with the initial cause (ear infection/insect bites) which it sounds like you're addressing well with fly repellent, the panomec for mites/parasites/flies to some extent; thereafter, it is time and nature that will heal the swellings.
In dogs, sometimes an operation is done to open the haematoma surgically with sutures and sometimes even buttons sewn onto the ear to prevent it refilling and healing wrinkly. Without the operation, the body will eventually reabsorb the fluid, but it may heal a bit wrinkly like a boxer's cauliflower ear.
It is not so common in other animals but it can happen, I recently did that operation on a cat, which I believe had a haematoma following a bite, and I had one of our own litters of kune kune piglets that were particularly boisterous, and chewed each others ears more than usual and many of them had haematomas which healed on their own just a bit wrinkly - one of them we still have as a breeding sow and it doesn't bother her one bit!