That may be true, but it's not actionable advice on an individual level.
I think there's a tendency, particularly on reddit, to let perfect be the enemy of good in situations like this. Reddit will tell people that if you're not white then there's nothing you can do to get better behavior from cops and that advice such as mine above is therefore invalid. Being black in America changes the baseline interaction you can expect on average, but I think my advice will still do most people more good than harm most of the time.
If you want to have a boring incident free traffic stop, the best you can do is play your role in such an exchange and hope the cop reciprocates. Conform to the pattern of a mundane traffic stop so that the cop falls into the same pattern. If instead you play the role of some sort of agitated sovereign citizen, the cops will almost certainly reciprocate. In the first case, nothing is ever guaranteed but in the second case a negative outcome of some sort is virtually certain.
BTW I think this advice applies generally to almost all encounters with strangers, not just cops. Superficial politeness is a superpower. It works on anyone from troublesome new neighbors, crazy threatening people you encounter on the street at night, even stiff indifferent bureaucrats. Superficial politeness gets better outcomes from almost everybody, most of the time.