There is pretty much one way to stop this: stop patronizing carry-out and counter service establishments that throw a tip question into the checkout process. It's not enough to just elect zero tip. Stop giving them your money, period.
No problem tipping for good sit-down table service, or a good bartender at a bar. But at carry-out and self-service places, there's no service provided so nothing to earn a tip.