Not possible either, in vanilla.
Since you mentioned it's an endless battle but that weapons are piling up somehow, then I assume it means you're providing the player with constant supply of ammunition.
If you insist on staying vanilla, then perhaps getting rid of this ammunition supply could help towards staying within the entity budget, by forcing the player to collect the dropped weapons for ammunition. Not the perfect solution, but might be the best you can do without code changes.
Either that, or replace the human soldiers with monsters that don't drop anything on death.