First you're comparing one optimized PC to another.
No, I am not.
"I memorize and cast animate objects and cast animate undead" is not an optimized wizard.
The wizard has dozens of build choices -- more, if you count each attribute point. I picked
two build choices (two spells known) that typically are
dirt cheap as purchased ad-ons (learned spells), selected a
small number of daily choices (2 known spells out of, what, 10-15 by that level?) for the wizard.
Then I used one spell for the actual encounter (animate objects). The wizard has three of those per day.
I then compared it to a reasonably optimized fighter. And found that this
build unoptimized wizard was matching the
optimized fighter.
I did pick useful spells and tactics on the wizard, which was enough to boost the wizards effectiveness by probably 2x to 3x. Sadly, an unoptimized fighter rarely has such a choice.
Either look at optimized PCs or not.
No, I didn't, and no, I won't do so at your demand. Rather presumptuous of you to demand I do so, isn't it?
Second, a fighter has a lot of ways to counter the attack penalty and they'll still have a higher bonus to hit than skeletons even without things like bless or one of the ways to get advantage.
Yes, fighters can get spell casters to buff them. That is a great way for spell casters to produce a pile of additional power, often cheaply.
Note that optimized minionmancy tends to not have space for that, however.
Getting advantage relies on DM fiat, a class ability, knocking prone, or spells. Fighter (EK) built-in spells that give advantage are thin on the ground sadly. Many, if not all, of these tend to grant advantage to all allies -- so apply to the swarm of coins as much as the Fighter.
Other than bless, the +8 to hit on the swarm of tiny coins is higher than the great weapon fighter's +7 to hit.
But again, you are strangely focused on random details. Do you understand the point of this isn't to show that "fighter suck and wizards rock", but rather than "optimization creates a greater gap between PCs than class"?
If you agree with that premise, then there is nothing to disagree with here. I don't care if you have issues with the details of how I showed it.
If you disagree with the premise, feel free to directly confront the premise instead of bringing up "but there are details, what about the details, this detail" that ... doesn't seem to really address the premise at all? The exact attack bonus of a level 11 fighter vs a animated object coin cast by a level 11 wizard isn't all that important to the premise, yet seems to be what you are focused on.
Do you disagree with the premise - that optimization makes a larger difference than class choice -- or not?
Third you're assuming that shortbows and arrows are available for those skeletons. I don't. Fourth, all of the additional skeletons and objects you're adding take up space and you're assuming they can all attack. Lastly, skeletons have a whopping 13 HP, although the objects (which again, I've seen used to good effect) have 20. Neither going to last long if they're attacked or included in an AOE.
Yes, they are a great source of HP!
Of course I assumed the skeletons animated by the wizard as part of that wizard's daily habit have shortbows.
I also assumed the fighter has a weapon and isn't a great weapon specialized character punching the dragon.
Why wouldn't the wizard have shortbows for their skellitons? Or the fighter have a heavy weapon when specialized to use a heavy weapon? Both seem like statements I wouldn't have to justify.
Another aspect people seem to ignore is immunities, resistances, legendary resistances, the defensive capability of the wizard meaning they tend to be glass cannons, assumes the wizard has the right spells and etc..
I'm not sure who you are addressing here. I mean, the examples I gave didn't even have foes making saving throws to any extent, and you are talking about legendary resistances.