As a 250-330 ping player player depending on server I pretty much have to work along side my ai to beat quality Rambos. A few good tricks are mostly to do with using the environment, setting up your men with backs to a building is good because it limits the angle the cav can attack from because of fear of hitting the wall and rearing themselves and they can't use couch effectively. There is only 1 location where your can't do this at c flag in jawali, but b and a on that map are both really good for it. f1f3 at last second in a short burst when the cav is coming in and then bring them quickly back to position ready for the next pass, as the captain stay with your men, predict the side the cav will pass on and be there to pressure them to turn to close to your men or make them give up the charge.
Imo light pike inf suck, they are too slow at turning and always seem to be busy looking elsewhere lol heavy inf with spears is the way to go if you want to be prepared for Rambo. Also if you take light pike inf sand the Rambo decides to not pick cav your a liability for your team with your unit choice
B at jawali there is a tight spot between a building and a tent, cram your men in there and this gives the Rambo a really hard time getting an angle, if they come in they usually hit an object or one of your spears. It's also the best place to put your non spear (2h especially) inf if your defending from Rambo for the same reason. Any horses that get caught up there are as good as dead. Look for similar crammed areas or slim choke points to further reduce the Rambos angles on other maps