I have been considering using the board game Commands and Colors to simulate large battles for a campaign in which the players are in control of armies. The main advantage of the system is that it is fairly simple to play and understand while also being fast (each battle takes about an hour) though the main issue with the system would be that the players would have very little role on the battlefield itself except as leader units. Also a magic system would need to be added to accommodate for large spells. Flying magical creatures like dragons are also not accounted for. However, the system is fairly flexible and the rules and scenarios are available for free online and since all you need are die, a hex board, and something represent units, the cost could be zero.
Essentially the game functions using a system of cards to order your troops and die to simulate combat. The number of cards a player holds is generally indicative of the skill that the general showed in battle, so for a D&D campaign this could be attached to a character's Intelligence, training in war, personal attitude, etc. It also may vary with each battle, so e.g. for a surprise attack the player may have less cards to simulate being caught off balance.
My idea for magic and magic items was for the player to have a small set of abilities that he could activate, but only once a battle. Like raising a magical banner at a crucial moment to put some backbone into your line, or befuddling the mind of the enemy's crack troops just before your cavalry charge in. And as a simple change, elephants could be changed to ogres or trolls or giants.
For now most of this is just conjecture and throwing around ideas and it really only answers part of your problem, but perhaps looking at these rules might help you plan out your battle and how you want it to play.