/gamerule maxEntityCramming 24 is standard and should do the job. Did you tried it with other mobs?
The maximum number of other pushable entities a mob or player can push, before taking 3 (Heart.svgHalf Heart.svg) suffocation damage per half-second. Setting to 0 disables the rule. Damage affects survival-mode or adventure-mode players, and all mobs but bats. Pushable entities include non-spectator-mode players, any mob except bats, as well as boats and minecarts.