It should work given the right battlefield conditions and some skilled generalship. It will become harder to do head-on charges, even with overwhelming application of force and numbers, as "gunlines" get better with improved technology and troop quality. The Suppression Fire ability helps "gunlines" better deal with charging Samurai, so fear suppression fire once the AI has researched it. Kneel Fire will double the firepower output of "gunline" units as well since the second rank will then also be able to fire, so watch out for that too.
Hitting modernized armies in the flanks and from behind with cavalry or samurai will make a certain mess of them. A good cavalry charge in to the flanks of a unit can wipe out at least 50% of a Line Infantry unit. Head-on charges can work early on to good effect, though they may be casualty heavy at times.