This is a simple mod that makes entities duplicate whenever they hit something. There is a decent amount of config for you to play around with.
I highly recommend that you pair this with server entity optimization mods, as well as entity rendering optimizations for cases with tons of entities.
It's actually pretty playable in survival on default config, as most of the interactions that cause extreme entity counts require player intervention to occur in the first place. However, if you're still concerned about the lag this might cause, I recommend you either disable same-type duping to prevent mobs like skeletons and snow golems from duping again when they hit their own duped enemies, or setting the target whitelist to ["minecraft:player"] so that they can only dupe when they hit you specificially.
Since this duping works by copying an entity's NBT data directly, it should be compatible with most modded entities:

