That's precisely why railguns and coilguns could come into use. Recoil depends on projectile momentum, while damage depends more on kinetic energy. A faster projectile delivers more energy for the same momentum, and electromagnetic accelerators can get the projectiles going a lot faster than chemical propellants.