Actually, local office does influence all that. Local office is crucial with respect to these things.
This is an important point. When we talk about "party machinery" and the issues of getting on the ballot and finding donors for candidacy and all of these things, this is all a matter of speaking with various local officials and comparing mutual assurances of conditions and intentions. When you are not doing this between elected officials and their staffs, you must do it within popular organizations that will generally evaporate with one or another change in superficial conditions--the passage or failure of a bill or the penetration of the organization by agents provocateurs or police action or an election or whatever.
Sanders has managed what he has partly because the Democratic Party had so crassly and openly betrayed its base and spat on its left-leaning supporters, but also because he had an organization and a track record. People of all sorts knew that they had abundant reason to count on Bernie Sanders for certain sorts of policies and a certain sort of practicality.
Sanders is still a long shot in this election, but given circumstances as they are, his campaign has been startlingly effective, and the Clinton campaign will not patch its leaks even if Clinton achieves office. If anything, the error has been that there were not enough officials and confreres in local office to push him over against the smarmy manipulations of media and other wealthy pretenders.
Here's to green dogcatchers and teachers' unions.