Combat in CW2 involves many aspects and is perhaps best described as a game of inches. You want to get the most of the situation, with terrain and weather to your advantage, good commanders, line or elite infantry, heavy artillery, ample cavalry for pursuit, high initiative and lots of supplies. As the defender, you also want to max entrenchment. None of these is a silver bullet in itself, but do more of them better than your opponent and the advantages add up. Good luck!
I'm the 51st shade of gray. Eat, pray, Charge!