When engaging armies that have heavy cavalry in them I usually deploy my Heavy troops in deeper formations (at least 6). This allows them to withstand a charge better than if they were in 3-4.

Plus, use missile weapons to take down as many horseys as possible or whatever you can do to disrupt the charge.