The thing is, Good DMing is not a scalar factor. You can by performing one good DMing activity, result in Bad DMing via excess. Thats why you're facing this problem, because you think its a single goalpost while it more accurately describes a balance of factors.
Railroading is bad, because it denies player volition. Railroading in its lesser form is good, its called an engaging plot. Lack of rails entirely gives you a sandbox, which not all players are suited to, placing the wrong types of player in a sandbox is bad DMing. In gaming, the destination is practically insignificant, people derive enjoyment from the journey, and a final high from the conclusion of the journey.
Consider the differences when putting players in a scenario.
Direct railroading: They engage the plot in the exact same way no matter what they do. Extremely easy to detect, they are actors in a predefined script(bad DMing).
Sandbox: They poke around their immediate surroundings, arbitrarily decides that some trivia is a hook, and pursue it. You have no preparation for that, and either they are stonewalled, as they pursue a dead end(this is bad DMing) or you have to improvise something right then which can lead to setting inconsistency(also bad DMing). Full open sandboxes are best for self motivating players and improvisation master DMs. You cannot feasibly define all aspects of a sandbox without also making it a small box.
All Roads Lead to Rome: This is a hybrid, of the above two, leaning closer to rails. It diminishes the flaws of rails because in game there is very low perceptible differences between pursuing a given plot or following a given plot. It can be detected...only when they actively reject the plot, which is bad because you are pushing a plot they don't want, not because of the method. Its also vital to any DM who doesn't have unlimited time to use.
Law of Conservation of Detail: Best for reactive players. Just give them ONLY the details they need to go after the plot. For lack of anything else to seize on, they will follow it. Drawback, the setting will seem thin, and immersion may be lowered.
Everything can lead to bad or good DMing, including the inverse. You are to balance conflict(Scaling CR? Gygaxian Naturalism? something in between?), story(Rails to Sandbox), mechanics(RAW only, Final Destination to House of House Rules to Magic Tea Party), loot(Monty Haul to Scrooge), player volition(Only Players matter to Only Story matters) and more. The only constant is the extreme ends are bad. The ideal midpoint varies by group.