Are the skinny slats or big boards?
Eitherway, shimming pushes up against the nails that still grip, and that creates a lip that people may trip on or may just look bad.
The normal fix is slightly bigger nails in the same hole.
Snap off screws should hold a lot better and be a more permanent fix, but I have no idea about the brand.
Also keep in mind that after you screw it in, some of the original nails may need driven in so they don't poke up. You can use a small hole punch to get them below the wood. Which you may want to try just doing that first.