I don't know where you get the 25% number from.
Halflings have an average of 12 dex and against an AC of 15, is hitting on 7 numbers or 35% of the time. So that's 140 hits without luck coming into play. At an average of 3.5 damage a hit, that's 490 damage. Your 3 demons had 50something hit points, it kills those 3 demons in 1 round three times over. And there wouldn't even be three wandering demons in the first place. Hell, at half damage they take out a pit fiend in 2 rounds
So, Commoners get 10's. If you want to increase that to 12's I can't stop you, but then I can do variant humans and get 12's there too.
Also, dex is fine if we are talking slings. Less fine if we are talking sticks and clubs, or even throwing rocks which Mordenkanens says is wha they are doing. Thrown weapons without finess (like a rock) would be strength based, not dex based.
Thirdly (dang lots of problems with your analysis) I said AC 16, not AC 15. I wasn't using those specific demons in this example, I was talking about your ridiculous assumptions about how much more accurate every single attack by a halfling was. I picked 16 randomly.
But, if you want to change the analysis like that, sure, we can go for it.
First off, your analysis of the halfling was wrong anyways, because you didn't account for that Lucky ability you keep saying is so game changing. 7 numbers at 5.25% is actually 36.75%. Which means 147 hits, for 514.5 damage. Which is an increase of only 5%. Outside of rounding errors finally, but not the absolute game changing ability you keep touting it as.
Humans?
Variant Human, +1 Dex from race, +1 Dex from Weapon Master, also gives them proficiency with longbows. That is a+3 to hit, against AC 15 that gives them 9 numbers, or a 45% chance to hit. 400 attacks at 45% is 180 attacks, with an average of 5.5 damage (and greater range making those 400 attacks more likely) then that's 990 damage, 500 points more than your numbers, 475.5 than mine.
Oh but wait, I'm going to be told I'm cheating for using the variant human. I should use the base human. So they only have a +0 to hit.
+0 to hit, 15 AC, 6 numbers, 30% chance to hit, 400 attacks means 120 hits, longbows still for 4.5 average damage is 540 damage, still 50 points higher than those halflings you did the math for, actually only 25.5 more damage than my halflings.
So, again. Lucky does not make Halflings these super effective fighters that are going to devastate anything. What is devastating everything is making 400 attack rolls against it. Because, as shocking as this may sound, 400 attacks against three targets is devastating.
Go down to a more reasonable 30 attacks and the numbers again shift, pretty dramatically.
Your Halflings -> 10 hits for 35 damage
My more accurate numbers -> 11 hits for 38.5 damage
Variant Humans -> 13 hits for 71.5 damage
Basic Humans -> 9 hits for 40.5 damage
Oh right... and didn't those demons have resistance? So cut all those numbers in half. And, again, those specific demons have damaging aura. That was why I picked three of them to destroy a town to show how deadly a demon attack can be, Radius 30 ft... what is the short range on a sling again? Oh right, 30 ft.
So, those brave halflings run within 30 ft of the three demons, throwing slings, then retreat. We are looking at about 19 damage to one of them, so it defintely survives. Demons run forward, dashing for 80 ft. Oh and then every halfling within 30 ft of them takes 1d6+3 damage, so easily about half of them die at the start of the round.
And, if you want to do the 400 attackers. I'd remind you that more than likely, 400 of them can't run in and out of that aura, so a lot of halflings firing at disadvantage, lowering their accuracy and adding more misses.
So, in conclusion. No. Halfling luck is not an ability that makes Halflings so much more incredibly dangerous than humans. At best they are slightly more accurate, but en mass they are still not able to compete with slings compared to arrows.