This is a fascinating topic! One of the first things it makes me think of is the idea that King grew up in relatively small towns, and in somewhat disadvantaged circumstances. I'm always reluctant to impose an autobiographical reading on any piece of fiction, but given how prevalent the idea of confinement is in King's fiction, it's obvious that the topic is a big deal to him. So I wonder if it sprang from a simple desire to "get out" (maybe not quite in the way it came through for Bruce Springsteen in his early records, but who knows?) and make a better life for himself.
Some of it might also be inspired less by autobiographical concerns than by self-imposed storytelling limits. Alfred Hitchcock -- of whom King is almost certainly a fan -- used to do that from time to time, in a way not dissimilar to Paul Sheldon's game of Can You. "Lifeboat" is probably the purest example, but "Rear Window" and "Rope" also come to mind. "Misery" and "Gerald's Game" seem almost like conscious attempts to be Hitchcockian.
I'm also put in mind of the ending of "The Dark Tower," wherein we learn that the Crimson King is trapped within a very specific place in the Tower. If I'm not mistaken, we had actually known that about the Crimson King going back as far as "Insomnia," and all that is true, then you COULD argue that the entirety of King's Tower mythos (i.e., nearly the entirety of his canon) represents the efforts of the Crimson King to escape his own confinement.
In the movies, King has also written several original screenplays which touch on the theme: "Storm of the Century" is about people trapped by a blizzard on an island; "Rose Red" is about people who go willingly into a haunted house only to become trapped there. And from "Creepshow," you get "Father's Day" (in which the corpse of poppa Grantham escapes the confinement of his burial), "The Lonesome Death of Jordy Verrill" (in which Jordy's rural existence feels like confinement), "Something to Tide You Over" (in which Ted Danson is buried in sand up to his neck and cannot move), "The Crate" (in which a monster escapes its confinement without a very old storage crate), and "They're Creeping Up on You" (in which the wealthy businessman lives in self-imposed confinement only to have it violated by bugs).
Finally, I'll add this: "A Very Tight Place" is a terrific story, but it's the grossest thing I've ever read. King swung for the fences on that one, and connected.