Car cranks, drives and dies unexpectedly

I have a 2005 SLK55AMG. When cold, the car will crank fine and run great, but then dies while stopped at a traffic light. When I try to re-crank it, it turns over but doesn't crank and then act like the battery is dead. Two days ago, I took it to an indy shop with the proper equipment and the only fault they found was a bad alternator. I picked it up and drove it home...no problems. Got in it the following morning and it died at a traffic light again. Someone brought me a different battery. We swapped it out and the car started right up. Changed the battery back out and drove it back to the shop and of course they can't replicate the problem. I'm thinking cam positioning sensor may be bad and disconnecting the power cleared the error and allowed the car to crank. Thought anyone??? PLEASE!!!!!