Actually, there is that stopgap between 0 and -9. It's an optional rule in the PHB called "At Death's Door" but it was de facto core pretty much since the beginning.
As for avoiding a TPK, as a new DM in the system, you will probably end up causing one by accident. Hell, veteran DM's do it from time to time. Things can get ugly real fast.
The best advice I can give you is not to fudge the game, but to, when it happens, admit that you made a mistake and offer to the group to backtrack if neccessary or otherwise "fix" it. Say the monsters take the players captive instead of killing them, or some other group has swooped in to rescue them. Or simply say "oops, my bad, that was tougher than I thought it'd be, let's backtrack there."
Don't be afraid to admit you made a mistake. You won't be perfect, don't try to be.