That's so scary, but I am glad he is okay. I don't leave any collars on my girls when they are home alone for that very reason - maybe that is something you could consider?
We live in a high-rise, so even if they darted out the door, they'd have to make it 14 floors down before they'd be "free," so I don't worry as much about them escaping without a collar on them.
I wanted to add that my girls used to just have their id tags on their harnesses, but when they started going to daycare they wanted all the dogs to have breakaway collars with their id tags on them - maybe you could just use a harness instead.