Give small animated objects magic weapons
If your animated objects have hands, you could provide them with magical weapons. There are even common magic items that could be crafted or purchased relatively cheaply such as the moontouched sword from Xanathar's Guide to Everything:
Weapon (any sword), common
In darkness, the unsheathed blade of this sword sheds moonlight, creating bright light in a 15-foot radius and dim light for an additional 15 feet.
The objects would lack proficiency (dropping the chance to hit by 20%), but your damage output would still be greater since you could get past resistance (and certainly better against immunity). Below are the damage per round outputs assuming a level-appropriate 18 AC with resistance (using a rapier for Dexterity-base sizes, and a greatsword for Strength-based sizes):
| Size |
Slam Attack (resisted) |
Moontouched Sword |
| 10 Tiny |
17.875 |
* |
| 10 Small |
14.625 |
16.25 |
| 5 Medium |
8 |
5.5 |
| 2 Large |
5.85 |
4.5 |
| 1 Huge |
4.675 |
3.85 |
As you can see, the 10 tiny creatures are dealing more through resistance than the small creatures can with the magic weapons. To get past this limitation you would need a +1 weapon which is quite a bit more expensive or harder to collect, but gets you the following chart:
| Size |
Slam Attack (resisted) |
+1 Weapon |
| 10 Tiny |
17.875 |
* |
| 10 Small |
14.625 |
22.5 |
| 5 Medium |
8 |
8.125 |
| 2 Large |
5.85 |
6 |
| 1 Huge |
4.675 |
4.8 |
This would be boosted even further with more powerful magic weapons, but remember that animate objects doesn't last long enough to get attunement.
Tiny creatures and weapon sizes
You'll notice that I excluded the tiny creatures from the charts above. This is because tiny creatures can't wield normal weapons without disadvantage. The Dungeon Master's Guide states:
A creature has disadvantage on attack rolls with a weapon that is sized for a larger attacker. You can rule that a weapon sized for an attacker two or more sizes larger is too big for the creature to use at all.
...so a tiny creature only deals (disadvantage on the weapon attacks):
| Size |
Slam Attack (resisted) |
Moontouched Sword |
+1 Weapon |
| 10 Tiny |
17.875 |
10.413 |
15.2 |
If we were to get properly-sized tiny magic weapons, it isn't clear whether they deal full damage. For example, the sprite's weapons get their weapons changed to 1 damage:
Longsword. Melee Weapon Attack: +2 to hit, reach 5 ft., one target. Hit: 1 slashing damage.
Shortbow. Ranged Weapon Attack: +6 to hit, range 40/160 ft., one target. Hit: 1 piercing damage...
If we use reduced-to-1 weapons, we get the following table:
| Size |
Slam Attack (resisted) |
Moontouched Sword |
+1 Weapon |
| 10 Tiny |
17.875 |
17.05 |
24 |
...so if you can find or craft 10 tiny-sized +1 weapons than this would be worth it, but it is probably much easier to get 10 medium-sized +1 weapons and give them to the small creatures (at the cost of only 1.5 DPR).
If your DM allows the tiny creatures to still do full damage with their weapons (as seen in with the quickling's weapons), you get the following table:
| Size |
Slam Attack (resisted) |
Moontouched Sword |
+1 Weapon |
| 10 Tiny |
17.875 |
29.75 |
38 |
...making the investment in tiny-sized magic items much more worth it.