Well, if you indeed know all that stuff then the issue is probably timing, control, etc. Sometimes battles just don't go well because of mistakes like these. This happens to me occasionally. If it's happening consistently though, then I would analyze how you're approaching battles where the enemy has guns.

To answer your question, I don't have those issues unless I make a glaring contol mistake (meaning click wrong, select wrong unit(s), etc. in the heat of battle). It takes a gigantic AI army with tons of reinforcements to beat me if I have a balanced army, and even that doesn't happen often because I push my entire army to their end of the map, keep them together in coordinated formation, and rout the reinforcements as they arrive.

Then again, my choices on the strategy map usually prevent lopsided battles like that from happening. Usually I'm the one choosing to attack in mid- and late-game. The AI rarely attacks me because it has "reasoned" that to do so would result in defeat. Then again, sometimes I "trick" it, by deliberately fielding a small, but strong army, specifically designed to draw out and defeat its target (armies with ninja are excellent for this, particularly on certain maps).

It's time for Samurai Warlords MP! Yay! Cya.