I think you did the right thing and hope it does not put you off.
On my coastal walk, I have walked through a lot of docks, warehouses, industrial areas and city roads, often deserted and in the dark early evening. With a full pack, there's no chance of me running away, and my calf muscle is prone to pulling anyway if I run for long. I rely on a keen awareness of my surroundings and the very low probability of meeting someone threatening. Then again, I came face to face with a bear in the Canadian woods when walking alone at dusk, so what do I know about probabilities?
At my age, I'm not really worried about stuff. If it happens it happens.