When I was younger, I used to space out a bit while driving, but I was quite aware most times that I was doing it. What you're describing sounds like you really weren't aware, so I'm not sure how helpful my comments can be.
In my case, I started staring in one spot instead of flicking my eyes around the road. I still had awareness of my peripheral vision, but I had a strong impulse to just space out rather than turn the wheel, or slow down, or speed up or whatever I was supposed to do. I wondered for a while if I was secretly suicidal, which really freaked me out, as I wasn't feeling like that at other times. But I couldn't think of any other reason why I would space out so dangerously while driving. I didn't know about AS at the time. I couldn't think of why I might be doing this. When I realised that spacing out and freezing like that was another AS symptom, I was terribly relieved. I can just snap out of it now, telling myself it's not an appropriate time.
As for falling asleep, I followed some advice from the sensory programme 'How does your Engine Run', and I found an activity that kept me alert. I suspect it also helps with spacing out. For some people music helps, for others conversation or talk radio, for me what helps keep me alert is eating, or drinking, especially eating. If I have a bar to munch, I'm much safer on the road. I don't think that's a blood sugar thing, it's sensory.