To be sure, it would have taken Krall a similar amount of time to destroy three dozen Constitution class starships
Nope. The numbers are different: the Swarm is immensely larger in the attack against the station, but the station is not that much bigger than the ship. It's just pumping out a bit more firepower that is doing a much better job than it should.
No they don't. They have SIZE.
Which is a qualitative and decisive difference that stops lions from attacking them. It's a complex quality that no zebra could achieve without becoming an elephant, because size doesn't scale well in biology.
Similarly, all Yorktown may have working for it is more guns - but that transcends the swarm-fighting concept somehow, making the station disproportionately good at it, and establishing that Starfleet indeed can cope with swarms.
That it can't cope with the Swarm is merely a function of it being a big swarm, not of it being a swarm.
Of course he is. He's been intercepting Starfleet traffic for years, analyzing their computers, their ships, their tactics, their systems.
This just means he might have ideas of how he should fight. He cannot translate those into reality, though, because he cannot tailor the Swarm. All the Swarm can do is be the Swarm. And some Starfleet assets deal better with swarm attacks than others; the one Krall studied the most is the one that resists him the best, out of our small sample.
because Krall specifically directed attacks at its weapons and then shields
We didn't hear of reduced weapons capacity; we just heard of an inability of the weapons to cope with "this type" of attack. The Swarm would have triumphed in both cases anyway, but in the Enterprise case it really didn't need any tactics to do so. (The "cutting their escape" thing only became a necessary refinement when it became evident that finding the superweapon was more difficult than expected.)
Everything Kirk tried to do, Krall quickly and precisely countered; he had planned the takedown of the Enterprise WEEKS in advance, and probably even had time to rehearse it.
I'm sure Krall planned and rehearsed. It's just that his plans didn't survive contact with the enemy, as is standard fare. He was improvising and reacting, at times only triumphing through sheer personal effort in "bottleneck" situations where his assets were incorrectly deployed to be of help. Hence personal combat with Kirk!
Apart from the fact that he has control of the MACHINERY that makes those drones in the first place, we know for a fact that he's been attacking other ships for decades to maintain his livestock.
We know of no such control. And we see from the Enterprise fight that ships don't pose a threat of attrition to his strength. Yorktown did; it was an irrelevant threat that would not have saved the station, but if Starfleet at large has Yorktown-style fighting systems, then the threat accumulates and may eventually stop Krall.
The movie is very EXPLICIT in the fact that Starfleet was not qualitatively able to cope with swarm attacks using conventional weapons.
Again, not. The heroes said the ship was not, and we can believe them. There was nothing to indicate the station was not.
The proof, then, is in the pudding: Starfleet's qualitative advantage IS NOT in its weapons, but in its capacity to exploit its enemies weaknesses.
That's a nonsensical argument: that Starfleet can exploit weaknesses in no way establishes that its weapons would lack qualitative advantages, much less be unable to cope with swarms (which as such are a common threat already encountered in the 2009 movie and neatly handled by the Kelvin to the loss of no shuttlecraft).
You might just as well argue that Starfleet doesn't know how to build a shuttlecraft because transporters always save the day (or vice versa). The "because A, then not B" argument is fundamentally inane.
Timo Saloniemi