No, I don't mean a law. I don't even know how you would make this a law. You can already legally just walk away. Maybe you can have a law that the "no tip" option on card machines must be at least as easy as the tip option or something.
There is no such thing as "everyone", but you only need a tipping point. Maybe 1/3 of people or similar. You just need enough awareness so that it isn't considered incredibly rude or outrageous, that most retail workers will understand what is happening and the businesses will see it coming. It definitely wouldn't be easy, that is why I would put the target date far in advance (maybe next January is actually too close). So that cultural knowledge could slowly be built and enough people to make a difference would switch at the same time.