Since 1968, about 17 candidates ran in Democratic primary races and earned enough votes (above about 20% all told) to count as having been contenders.
Of those, one was murdered, one was shot but lived, one was eliminated from competition by GOP dirty tricks, and one left the race because of insufficient support but would probably have been exposed as having two families (that would have been a scandal) had he stayed in the race.
Putting this another way, there is about a 24% chance that a Democrat running in a primary will be taken out of the race for extrinsic reasons.
Given the stakes, i.e., becoming the most powerful person of the 7 billion on Earth, one would probably stay in the race if one is in second place.
I should note that the gunning down of candidates has not happened in a while, and those early events caused a significant increase in security. Dirty tricks are still a possibility, and we may have seen that in this year’s race, but if so, they were against Clinton, not Sanders. Scandalous behavior wiping out a candidate is unlikely this year as well. Clinton has been more heavily vetted than any candidate in history, and unless Sanders’ tax returns turn out to actually be interesting (we’ll probably never know), he seems fairly scandal free.
But, the odds is the odds, and since the modern system of primaries emerged, which could be dated to 1968, your opponent has only a 76% chance of survival even if you do nothing.