Yesterday I drove my 1993 BMW 325is with 204k miles about 170 miles to my sisters house to help her with some sheet rocking. Right as I was arriving in her neighborhood my interior lights and headlamps started to dim and suddenly my check engine light came on. Additionally a warning light which resembles a sprocket around an exclamation mark popped up. The car started running very poorly but I was able to make it to her house and spent the rest of the day working on her house. When I went to leave that night the car was totally dead. After retrieving a new battery the car started up just fine and all the lights went away accept for the battery light which was faintly glowing. I made it about halfway back home when suddenly without warning the check engine light and the sprocket with the exclamation mark popped back on and within about 2 minutes after having pulled off to the side of the road, it wouldn’t start. I sat for about 45 minutes while I waited for a tow truck and out of the blue, the car was able to start right back up. Not knowing what was going on and not wanting to do more damage I just waited for the tow and brought my car home. Prior to this my ABS light has been on for about 2 weeks. Does anyone have any idea what’s going on or has heard of this? Thanks for any help.