Shock cavalry are relatively easy, you don't need a technological fix: discipline is the key. Pikes, longbows, crossbows, fieldworks, wagon-laagers, they'll all do the job if the discipline is there. Song Chinese writers were convinced that crossbows well-handled could stop a charge by any cavalry they knew, and they experimented (as had various other Chinese dynasties) with war-wagons as well.
Steppe light cavalry are harder, especially on their own ground, as much for logistic reasons as anything else: they can avoid battles they don't want to fight, and in the steppes "a small army is beaten, a large army starves".
Even without an IR, the Song had a huge well-equipped army that should on paper have been able to defeat any barbarian cavalry invasion, though perhaps not take the fight into the steppes. But it was underpaid, poorly disciplined and despised.
If we're not talking firearms, some technofixes you might consider are:
- Mass-produced man-portable obstacles to stop a cavalry charge, sort of Swedish-feather style, maybe chain-linked
- Mass-produced war-wagons, iron-plated and carrying multi-arrow ballistae
- Dionysios of Alexandria's chain-driven repeating ballista
- Bicycles, or tricycles. Hideously uncomfortable without pneumatic tyres, but could they be developed into an early-industrial form of infantry mobility? Mass-produced pedal-driven war-wagons, or even supply-wagons?