The other thing you can do is glue-and-screw instead of just using the screws. I’ve had a bookshelf or two break due to the screws blowing out of the chipboard during a move. Using regular wood glue/PVA meant that that never happened again although it also means you can’t disassemble it. Disassembling is kind of overrated though, the screws don’t ever go in as tight the second time, especially after it’s been sitting loaded with books for a few years.
When replacing screws in soft material, I slowly turn them to the left to feel when they drop into the existing thread rather than making new grooves. And in my experience, IKEA furniture reassembles fine multiple times. You also have to make sure such screws are and remain tight, because if they start getting loose that working back and forth will destroy the threads of the softer material. If a piece of furniture isn't solid, figure out why and shore it up before it gets progressively worse.
Oh, yeah, I discovered this not because I thought staples would be stronger but because I built one shelf first and was tired of trying to nail those stupid brad nails in by hand... so for the next shelf I pulled out the staple gun. Was so impressed with how much more rigid it felt that I went behind the other shelf and drove a bunch of staples through the backing cardboard :)