I can tell you first hand that sometimes refusing to consent to a search simply doesn't matter. You'll be given the choice of allowing the illegal search, or having your car searched anyhow after you are removed from it at the point of a gun.
Though I've seen cases where the defendant is charged with something and their car seized then the evidence is later found during an "inventory" of the vehicle.
IANAL so I don't how one would deal with that.
You can't. Police have the authority to impound your car for any moving violation. They can inventory the contents of your car in the process.
Why doesn't this happen often? Fear of public outcry. That, and an officer needs the search to unearth evidence worth the paperwork and bother. Police officers have bosses just like you and me.
Your only recourse: follow traffic laws to the letter. Unfortunately, this is more difficult than it sounds.