That's why I smile when people talk about making their own little hideout, like technology somehow changes the lessons of human history.
What would actually happen, in short order, is what happened in the past - the establishment of fort-towns, based (in all probability) on shared religious or philosophical principles, and run by families and blood relations. And while I'm sure there'd be a lot of bible thumping, I'm also sure there would be a lot of predation of "others," just like in the past.
Past, hell. Just like now, everywhere. People take the tiny bit of civility in the world far too casually. Each tiny mark of respect people show each other was reached through the blood of many in the past - and can be lost again, far too easily, if people don't treat it as the precious treasure it actually is.
Yup. When the store shelves go bare the civility will be gone.
Very true.
The book “World War Z” actually has a good chapter on this. A rich guy sets up a fortified house, it was already really secure, invites his friends and staff, expects to wait out the end of the world.
He would have, if he hadn’t been televising his behavior and his friends tweeting / reporting their reactions.
No opsec, so the barriers come crashing down as people with ladders and tools and families come pouring in out of the hope of safety.