When my son turned 16 and got his full license, and started going out on his own some, I had to have a conversation with him about Dealing With Cops. This was the gist:
1. Be polite, even if the cop is acting like an asshole. The more polite and respectful you are, the less likely they will be looking to give you trouble.
2. Cooperate fully and immediately. You have to assume that any cops you encounter would be pleased to have an excuse to Taser you or even shoot you dead; don't give them an excuse.
3. Say as little as possible. If they seem to think you've actually done something, say "Want my lawyer" and shut up.
It saddened me to have to do that, too. I used to be in LE, and there are lots of good cops... but as a parent I couldn't take the chance. All it would take would be one encounter with Mr Trigger Happy with-a-badge, and Son#1 doing something thoughtless, and that could be the end of the most important person in my world.
Regrettably it seemed necessary, things being how they are.