Not sure this is necessary, but if it helps some alliances, sure. My alliance does not need it because we donate a fixed set of troops to every base, and only one one person fills each base. The set of troops depends on the alliance gate capacity:
9 howitzer (if space reduction research done) or mortar and 3 shooters
12 howitzer + shooters
15 howitzer + mortar (or shooters if howitzer takes 10 spaces)
18 2 howitzers
21 2 howitzers, shooters
24 2 howitzers, mortar
27 3 howitzers
sometimes we donate machine guns instead of shooters. Not much difference.
We win every war doing this, because nobody ever gets max stars against us.