When I first began writing, the idea of writing one’s self into a corner was, I thought at the time, a completely groundless fear. Any corner one might wander into, I assumed, ought to be escapable simply by writing in a door, a window or an attic escape ladder.
... and of course there was always the DELETE key, the RED pen, and the eraser
But, as time and experience have shown me, the real problem writers face is the fear of revision... of being willing to sacrifice a character or a setting or a particularly good set of lines because, regardless of how much one might be enamoured with them, they simply do not belong.
Do what's write [pun intended] and the corner turns into an field full of open possibilities.
I’ve also learned that one can indeed write a story into a premature ending. Thankfully, it's neither fatal nor does it have to be permanent.
... though admittedly, sometimes the story is all the better for it.