If you fall in a sinkhole in a swamp, but the swamp is close to town, it is possible that a subway or sewer system might intersect it. If that happens, you can just walk out through the subway/sewer system. Even if it doesn’t there is usually jackhammers down there so that you could possibly tunnel out if you have spare gasoline on you. Most people don’t carry gasoline on them however, so yea for most people it’s just a slow death.
If it is in a spiders lair, I would be surprised if you couldn’t just walk on out through an upstairs. In fact, spider lairs with sinkholes seem to be really rare now. It sucks because I like building my houses on these places specifically to take advantage of the feature of having a basement.
And I could cheat them in, but I don’t because I like the challenge of finding that stuff legitimately.
I suppose houses in town will also have a basement too every now and then.