Ask the experts
I was diagnosed with a stress fracture this week and have been trying to find out a little bit more about this. I had been experiencing pain about an inch above my right ankle, on the outside of the ankle, for about a month, running through it. I did not have any swelling, just some tenderness in a very specific spot, like a bruise. The pain would increase whenever I ran. The doctor I saw, a sports physician, said it would take a lot of time and money to verify it, but he thought it was a stress fracture, so he put an air cast on my ankle. So, now I am wondering about possible causes and the best course of action, assuming the diagnosis is correct.
Whereas your concern about the future is understandable I feel you should realize that the main cause of stress fractures is overuse. The only identifiable risk factor in your story is that you obviously are a runner.
The good news is that most stress fractures do not recur once they have healed. A well-cushioned shoe with arches high enough to support you and enough space in front to keep pressure off your bunions would certainly seem helpful.
As for the future, you will need to pay better attention to your training routines and your body's own cues in order to avoid other injuries.