You are right, a better analogy would be if a person tried to cross in the middle of a random track segment. The woman didn't cross at a crosswalk so that part of road was not designated to pedestrians at all.
Cars (at lease autonomous ones) signal before changing lanes and slowing down.
I think that flashing lights is too annoying, but forcing cars that drive in the night to have lights sounds like a reasonable (and existent) rule.
Also, trains don't change lanes, or stop quickly. Its simply a bad analogy.