It’s up to the police to prove you were drunk while driving. Normally that’s not hard since they can show that between them getting to you, field so riery testing, and taking you in there’s no way for you to have had a drink before they take a blood test for instance. But if you break that chain, there isn’t a good way to prove that it wasn’t from after the incident.
Ah but you didn’t just have alcohol in your car. That’s totally legal, otherwise you would never be able to drive home from a store with alcohol. You even have witnesses stating you got it from your trunk, so even if it was already open, it could not have been within reach while driving. Which is a component of most open container laws.