You may be saying that whoever is coming for you has enough firepower and training to make your arms irrelevant. In which case your stockpile is just trade goods?
Who do you think has better odds? How about if B has friends who also want what A has? Don’t get me wrong defensive positions are useful, they are simply less useful than groups of people working together. The best prep is a few supplies and a community of people ready and able to support each other think walled town not fortified nuclear bunkers unless you’re actually willing to live underground and have a lifetime of supplies at which point hiding is more effective than guns.
There's probably an ideal minimum of ammo to go with the guns. But more ammo is better.
How many effective defensive fortifications can you name that ran intentionally without any arms because they are of "little use"?
The same applies in modern warzones, what works as a defensive position against a gun-armed mob doesn't necessarily work against infantry with military weapons including mortars and grenade launchers, and vice versa - if you know your opponents don't have proper equipment, you can effectively make deadly defensive positions which modern militaries wouldn't be able to use against their opponents.
As to a gun armed mob, it really depends on how capable they are. A defensive position is of limited value vs a well trained sniper using even a simple hunting rifle. The basic issue is it’s difficult to actually defend yourself without also exposing yourself. This is further degraded when talking about a single defender who can’t benefit from overlapping fields of fire etc.
Our hypothetical survivalist would benefit from training, but they don’t receive the primary benefit that keeps modern military casualties low, access to trained and well supplied medical personnel.
Not that post apocalyptic battles will involve artillery and tanks, but it is still informative.
A counter attack similarly isn't assaulting a prepared position.
Otherwise this is an ignorant view. Attackers can have advantages because of initiative. They can pick their place, time, and methods, find the weakest point, etc.
They can also choose to not attack at all. Which they do all the time. The number a times attackers have been repelled and destroyed despite possessing the initiative is innumerable.
Assaulting a prepared defensive position in it's strength is widely acknowledged to be a really stupid idea and you don't do it unless your other options are worse.
Defensive structures offset but don’t eliminate the advantage of initiative, especially when you start talking about a lone defender who needs to sleep etc.
Your conclusion about defense being essentially useless is still dead wrong.
Once the first few home invasions, rapings, and pillagings of sleeping residences have occurred. Word will spread. The would be invaders will encounter a round the clock watch setup by a neighborhood or family that invited all their cousins and can afford a 24/7 watch, with dogs, home made alarms, and man traps.
And those attackers will have the fight of their lives on their hands. Once their surprise element is gone, they lose the initiative to things they can't anticipate without serious new intelligence and all advantage is now reversed and you enter the counter attacking and ambush scenarios which you pointed out, are very effective.
That’s not my conclusion, it’s that defense roughly counters the otherwise overwhelming advantage of attackers.
> round the clock watch watch setup by a neighborhood
That’s assuming a great deal of cohesion in your post apocalyptic scenario. I have no problem saying large communities provide a significant benefit, but that’s a product of a working society not something you would see after say a disease kills off 99.9% of the population.