It’s a game for sure, but it’s a game based on history. Hence we cannot completely veer off from history and create a chimerical unit.
I don’t think this UU would be outright flattened by Onagers, since they have a speed advantage and can easily outmaneuver the Onagers. Unless you use them as sitting ducks to soak up the damage, which isn’t their purpose. The civ has other units for that role, such as their Cavaliers, Hussars, Battle Elephants, and even their 2nd UU the infantry mode of the Raeuz Tribesman.
Either removing their min range or giving them a slightly higher bonus against Cavalry (like +3 / +4 when elite for instance) would do, no need to make other changes otherwise the UU would be too strong.