Ok. I am an attorney and let me just make a few general observations. First, regardless of how you acted, those police officers treated you badly. However, based on your narrative, most of it was probably legit. In criminal law, there are two standards the police use to detain and search citizens: Reasonable Suspicion (RS) and Probable Cause (PC). Of the two, Reasonable Suspicion is the lower standard and it pretty much means that if the officer has a reasonable belief that you are breaking or have broken the law, he may detain and question you about it. If through questioning he uncovers more information that confirms or strongly suggests his suspicion is correct, he now has Probable Cause and can either conduct a thorough search and/or arrest you. So, how does this fit here?
You likely created reasonable suspicion of a violation when you passed as many as three (3) police officers and revved your loud exhaust. No doubt there is a exhaust noise law in CA in addition to any local ordinances. So, by doing that, you gave them reasonable suspicion to believe you violated the law. You probably also gave them reasonable suspicion as to any illegal performance mods like NOS, turbos, etc. That means they can detain and question you about these violations, even if you are not in the car anymore. Note that there doesn't seem to be any basis for reasonable suspicion about a DUI at this point.
After you got their attention with the exhaust, they followed and observed you driving. If you broke the speed limit even by 1 mph during this time, they now have RS or maybe even probable cause to believe you violated the speed limit. They don't need a gun, they can testify as to their "visual estimate" of your speed. I hate this standard, because the court always believes the cops despite it being entirely subjective and not very consistent.
So, by the time they stop you at the taco place, they've got RS or PC on noise/emissions violations and speeding. That means they can stop you and talk to you about it, which it seems they did. Now here is where the problem is. At this point, surrounded by 3 cops who were questioning you, I think you were arguably in Custodial Police Interrogation (CPI), which triggers your 5th right to remain silent and also your right to counsel being present during questioning. At this point, the magic words are “I need to speak to my attorney.” If you say that, all questioning must STOP until your attorney arrives. They do have the option of taking you to the station, but may not ask any more questions. If they do, anything you tell them plus any evidence they find after you ask for a lawyer will likely be thrown out of court. You appear to have done that here, but not right away, which was your first mistake.
The stuff about “Phillip” and ID was probably just BS to test you for evasiveness. It was probably ok though, since cops are allowed to ask you for ID as part of RS questioning. The alcohol questioning was totally baseless, since at that point they had no RS about drinking. They likely knew it, so that is why they kept asking you to go to your car, since the car violations (exhaust/speeding) were the only violations they had to go on and the only bases on which they could detain/question you. Where you screwed up was in lying to them about driving. Three cops saw you driving that car. When you told them you weren’t driving, it raised the bar towards RS for DUI or other common driving offenses. Then when you told them your wife drove you—a second lie-- , they felt enough RS to go into the DUI stuff.
The gross violation of your rights occurred when you advised the officers that you wanted to speak to your attorney and they took your phone away as you were calling the attorney. That is a blatant and reprehensible incidence of misconduct, and I would go after the officer who did it. Moreover, cops may not use a request for counsel as a basis to infer any wrongdoing or “something to hide.” Everything that happened after they took your phone away is likely inadmissible and I suspect your attorney will have no problem getting it thrown out. I would also ask his opinion on going after the cop who grabbed the phone as you were asking for a lawyer. This isn’t North Korea.
With that said, some important things to remember:
1. Don't Lie.
Yes, cops can lie to you to elicit information. But, if you lie to them, it just creates RS, which leads to searches, which leads to tickets, arrest, etc. Remember, you don't always know what they know, so a lie could be doing more damage than you think.
2. Be polite. Even if they are total scumbags to you. On the street, they have the power. With an attorney in court, you have the power and THEY are the ones who have to answer the tough questions. So, while on the street, be nice, smile and politely respond to them. Bad cops will try to harass you into getting upset, which they know may cause you to slip up and admit stuff. Don’t fall for it. Just say “I’m sorry, officer. I’m afraid we’ll have to wait until my attorney arrives before we can go any further.” Don't be smug or cocky about it, just neutral. Poker face.
3. Say the magic words. “I need to speak to my attorney.” Make sure there are witnesses, if possible.
So, could you have done it different? Yeah. You could have used the magic words right up front, but that might have resulted in a ride downtown before it was sorted out. You could have insisted on the breathalyzer, which would have eliminated RS on the DUI, but you’re still stuck with the exhaust/speeding issue. That means you still would have had to go to your car and eaten the NOS ticket- remember they had RS so they can search the car for mods. You could have told the truth about the car and maybe they would have just given you a warning, but it sounds like they were out to get you on something. I suppose the moral of the story is if you have obvious mods to your car (exhaust, flashy rims, big spoiler, etc.), you are giving the cops a “foot in the door” to stop and ticket you. With all of the new street-racing and emissions laws coming into effect these days, you should factor this in as a probable additional cost of the mod.