Honestly, for a moment I was thinking about cracking him in the head with a tire tool preemptively.
Without knowing the entire scenario or the laws in your state, this would have likely led to your arrest. However, you've got to do what you've go to do to make sure you're not a statistic.
I think, ideally, returning to your car, locking your doors, retrieving your gun, and calling 911 might be the best option at that point. In my state, brandishing a weapon in a "rude or careless manner" is a crime, but we do have some solid self-defense gun laws. We can't fire a warning shot either, and we have to have reasonable, articularable purpose for pulling a weapon necessary for self-defense in protection of life. People here have gone to jail for accidentally showing the bottom of a weapon when they reach up on a top shelf to get something. That law has since been modified, thank goodness.
That being said... I have a teenage daughter who just earned her driver's license. I can't imagine what you felt like or how she would feel in that situation. I imagine even as a male standing 6'1", I'd still feel a little off with someone behind me watching me change a tire on the side of the road. And honestly, I don't know if I'd tell my daughter to do anything different than you did or were going to do.
In regards to magnets, I know there are a bunch on Amazon, and as stated by someone else a few posts back, Lock'er Down sells them. You can cover the magnets in felt if you wish to avoid scratches on your weapon. I do know that game/hobby stores sell pick and pluck foam for miniatures. I also have some in a pelican case I keep my camera stuff in. Whatever your decision, please post some pics of your solution. I'm interested in finding out how well the foam option works.