I've also had many close calls like you have described, the only way to avoid this kind of crap is to expect the unexpected, and even then there will always be some creative traffic maneuver you haven't seen before.
I find it helps to have a front flashing light, once and awhile it gets noticed.
I rarely crack 50Km/hr here, no hills, and its asking for trouble if there is any kind of traffic to contend with.
For me, I always think of the hospital, its never a fun place to be.
RE: I Felt Lucky To Be Alive This Week | DTube Video