That might be an interesting mechanic. Allow unlimited stacking but make artillery pieces hit every unit in the tile. Civ kind of has that mechanic with nukes, but they have all sorts of other implications that make them impractical in most games.
Thinking about this some more it might be possible to make "doomstacks" that actually have some tactics.
Idea:
Unlimited stacking is allowed. Units are ordered in the stack based on melee attack power * current health. When stacks attack one another only one melee type unit and one ranged unit may attack any particular single unit on the other side. Both attackers and defenders work from the top down. If an attacker or defender destroys their unit then leftover attack power will be used against the next available unit, after all initial attacks have been completed, but that melee unit will take return damage based on the percentage of the attack they have remaining.
For example, side 1 has a stack with 3 warriors and 2 archers. Side 2 has 1 warrior and 4 archers.
Initial attack:
side 1 archer 1 vs. side 2 warrior 1: 40% damage to warrior
side 2 archer 1 vs. side 1 warrior 1: 40% damage to warrior
side 1 warrior 1 vs. side 2 warrior 1: 50% damage to warrior
side 2 warrior 1 vs. side 1 warrior 1: 50% damage to warrior
side 1 archer 2 vs. side 2 archer 2: 60% damage to archer
side 2 archer 2 vs. side 1 warrior 1: 40% damage to warrior
side 1 warrior 2 vs. side 2 archer 2: 40% damage to archer, 60% attack remaining
side 2 archer 3 vs. side 1 warrior 3: 40% damage to warrior
side 1 warrior 3 vs. side 2 archer 3: 100% damage to archer, 0% attack remaining
side 2 archer 4 can not make it to the battle lines and does not take an action
Followup attacks:
side 1 warrior 2 vs. side 2 warrior 1: 3% damage to warrior (10% health, 60% attack), takes 3% damage in return
The idea with the followup attacks is that it prevents someone from building an "army" out of a lot of cheap units just to roadblock strong units. By limiting battlefront size you still need to split your stacks to flank enemies or even attack on multiple fronts. Ranged units would be very vulnerable to melee, and artillery would be mostly strong against cities but would do damage to everything in the stack. Units inside of cities or fortresses would be protected against artillery and take very little damage.
I think this could be an interesting way to do combat, but it is relatively complicated and the AI would probably be even worse at managing it.