While this is a real fear of everyone with a connecting flight, it's actually not something that is very likely to hurt you. First, precisely because you worry about this, you're not likely to get so distracted that you forget why you are at the airport. Second, the airline pages people who are in danger of missing their flights. Hearing your own name should snap you out of your daydream pretty quickly. I've even seen airline staff wandering around other gates asking people if they are the missing passenger.
On top of that, airlines have some leeway to help you out. You're right there, you're upset, and you have some sort of story to explain what happened. They will probably just take care of you for little or no charge. I've missed two planes in my life -- both in Atlanta as it happens -- and one was not my fault (taxi arrived very late then broke down on the way to airport and limped me there after a partial roadside repair) and the other was totally my fault (spaced and thought my 14:30 flight was at 4:30). In both cases I was put on the next flight no fuss no muss even though it was clearly my fault in the second case. I understand it wasn't a connection, but leeway is leeway and I am quite sure there's no "only if you had trouble actually reaching the airport" rule.
Then finally, few people who can fly cannot come up with the funds for a ticket home. Yes, putting hundreds of dollars on your credit card would hurt, and might leave you with a bunch of issues when you get home about how to pay rent or buy groceries, but you could at least get home and show up for work so you keep getting a paycheque.
However, let's pretend all these incredibly unlikely things materialize: you are on your way home with no cash, nothing in your bank account, no room on your credit card, no line of credit, nothing, and you zone out and semi-deliberately miss your flight and the airline takes no pity on you and says "$400 or sit here for the rest of your life, we don't care." You can call your family or friends. Some will be alert for a "Grandma scam" but you can probably convince someone that you're really you and you need them to go to the website of a rival airline and buy you a ticket home. (You're not going to give money to the people who wouldn't take pity on you, are you?) If you are an orphan or all your other family members are as tapped out as you, then I suppose a GoFundMe and a social media campaign are your next step, though that might take a few days.
You're far more likely to get a bad sunburn, a jellyfish sting, or food poisoning, not to mention the dreaded "caught a cold on a plane" than you are to find yourself stranded because you missed a connecting flight. If this truly worries and concerns you and you can't talk yourself out of it, spend your connection time at the outgoing gate, and check every 15 minutes that the gate hasn't changed, while never ignoring a single overhead announcement. That's what most of us do anyway, and it will protect you from this highly unlikely scenario. (At least, better than sitting in a restaurant 20 minutes from the gate drinking, ignoring announcements, etc.)