What can counter horse archers? It seemed like they could counter almost anything that came their way, constantly just circling around an enemy and whittling them down with a constant rain of arrows
Shock cavalry would do the job. Also, if you can encircle an enemy force, they’re screwed. Doesn’t matter if you have mounted archers, or just on foot, if you can get behind your foe and attack from the rear, they’re going to be in a very bad state.
Historically, generals would seek to protect their forces’ flanks. Usually by deploying skirmishers to respond to anyone who tried to move past and strike from from some other direction. Mounted archers are far less threatening, when they’re being harried by your own light cavalry. They don’t need to actually kill them, they just need to force them to stay on the move, so they can’t function effectively.
Mounted archers had five major weaknesses. These aren’t exactly counters, but they’re factors which meant their usefulness was limited. In their environment, they were devastating, but these were extremely high maintenance units.
Strategic mobility is a problem for almost all mounted units. This may sound counterintuitive, because, “horses are fast,” which is true, but they also exhaust quickly over long distances. Figure that if you needed to move forces more than a couple day’s ride away, infantry would arrive sooner, and be in better fighting shape. As it turns out, humans are stupidly resistant to exhaustion; horses, not so much.
This also leads into another major, related, weakness: mounted archers are, almost exclusively, an offensive unit. You can’t move them around to respond to attacks. You may be able to engineer a tactical scenario that would benefit from them, but even in your example above the mounted archers are on the attack.
Logistically, mounted archers are very involved. This is hinted at above. The rider and mount both need to draw rations. For fast response units, you’d need multiple mounts at various way stations, as the rider traveled. (This is the easiest way to work around the horse’s limited endurance.) You’d also need to keep their ammunition supplied.
In contrast, with infantry, you just need to keep them fed and armed. What this means is that you can, reasonably, field a much larger infantry force than you could with mounted archers. Similar considerations apply for any mounted units, and also with any archers, but a mounted archer gets both, making them, logistically, expensive.
As a related thing, mounted archery’s difficult. I mean, archery’s not easy under the best of circumstances, the bow takes a lot of skill, but being on an unstable platform makes it significantly more difficult to hit your mark.
Worth remembering, while we’re covering this, historically, archers weren’t used for precision fire. That kind of accuracy was unusual. They were used for more general, “shoot over there,” rather than trying to pick off individual people. So, you’re really looking more at a unit that can deliver damage to a general area at range, and move if threatened.
Someone’s probably thinking about the Mongols right now. The short answer is, some of these factors were circumvented because of their nomadic nature, and the culture they lived in. If you build your entire culture around something, you’re going to have a lot of people who are exceptional in that field. With the Mongols, that was horses. This also bypasses a big part of the logistical issues, because you didn’t have to provide additional rations for a mounted archer, given the core of their forces were already mounted, the rations were a fact of life.
Rough terrain is a problem for any cavalry force. It’s not as severe for mounted archers, they don’t depend on their mounts to close distance quickly. However, it does still limit their mobility, which reduces their value. In some places you’d be better off with non-mounter archer support. In more severe terrain, the archers themselves will be a waste.
One of the biggest weaknesses for mounted archers are walls. Seriously, a fortified town or outpost is the end of the road for them. There’s no value for a horse when your opponent is immobile. At that point, it’s down to sieging, and the mount becomes a liability. It still has to be fed, tended, and taken care of, while it can’t contribute anything to the campaign.
This also works in reverse. If you have mounted archers, you get no value from the horse during the siege.
Of course, if the siege is successful, we’re back to horses being a liability during the assault on the city. Maneuvering in tight spaces, like street to street fighting in densely packed cities, is also not going to work well with the horse. This is another one of those cases where it’s not a problem for mounted archers, but mounted forces in general.
Now, close quarters is only an issue if your cities (and fortresses) are tightly packed spaces. Which starts to deal with something about how civilizations expand.
If there’s a lot of open land, cities are more likely to sprawl out. This is even true in pre-industrial civilizations. The overall population density will gradually rise, particularly around trade points, or along major routes, but it will be more gradual. As a result, buildings will be further apart.
If the available land is limited, particularly by geological features like mountains or water, then the population density will be higher. (There won’t be room to spread out, so, they’ll cluster closer together.) Those people will still need food, and as a result agricultural centers that can ship food into the city is a necessity. This may be up in the hills above the city, in the next valley over, or up the river. Regardless, there needs to be a way to get food into the city.
Another major factor is how aggressive nearby civilizations are. Even if there’s a lot of theoretically clear land, a city might be densely packed, because of enemy forces. In situations like this, you might see heavily fortified cities, with lots of, technically, usable land outside. In that case, food transport into the city would need to be secure. (Again, river travel makes sense. Though overland shipping becomes much riskier, and leaves the city more vulnerable to siege.)
Mounted archers were effective, but it’s one of those combat roles that has a very specific application, and outside of that it seriously starts to falter. Though, not letting your forces get flanked will go a long way towards preventing the situation you’re describing.