Snorkel, imo you're on the right track.
Veepveep, to be clearer on my issue being similar: driving along fine, esp and battery light come on, car shuts down. Windows etc still work. Let it rest a bit and repeat process (until the battery finally was too low to power it up and sustain it, then I needed a tow.)
As mentioned, I found the alternator was at fault, replacing it fixed it.
My limited understanding of what was happening: the alternator wasn't producing enough voltage to power the car during operation. The battery can do it for some time but can't sustain it. It still has enough power to work windows etc. After sitting a bit, whatever magical properties happen within batteries enables it to operate again after a short rest but after I did that twice or thrice it couldn't anymore (So don't do it or you'll prob get stranded.)
Other thoughts on the issue as mentioned by senior poster include the associated wiring harness, other posters have mentioned bad grounding contacts, and my last thought for now is something electrical is drawing so much power that the alternator (even if ok) can't keep up with the demand (y'all didn't install multiple amp stereos or something did ya??) I'm curious veepveep what the mechanic fixed. Seems a good bet that they charged the battery up while there which would have made it act fine for a while.