Slugs or flechettes can do a number on soft armor, but I'd don't they can punch through a plate (then again, neither can an m4).
On the flip side, how long's it been since we've fought anyone likely to be wearing Armor?
They're definitely a specialized weapon, but for clearing rooms/halls or boarding ships they still function pretty well. I didn't have the opportunity to serve myself, but I know my Old man always preferred a shotgun when boarding questionable vessels.
Of course most of the military applications I'm thinking of are really mostly cases of military taking on a LE role.
si vis pacem para bellum