While there may be optimizations to be found in these situations, I also wonder about the cognitive cost per optimization, and I wonder if it might not be better to put the most of your mind on a job or geography transition.
The problem is that in real life, most such cases (of buying the more expensive item) don't result in a pure savings, but rather, leave you better off in some ways and worse off in others. The cheaper shoes, IOW, will not actually be so bad that you have to replace them entirely, and you will in fact end up with with more liquid savings. The temporary discomfort and greater savings are much harder to compare to the alternative than the example suggests, so wealthier people do not always have some obvious choice that leaves them better off in every way.
So, on top of that, it's not an issue that is fixable simply by pointing this out to the poorer person and loaning them the money.
But I'd have to concede that you'd be right to say it still doesn't fit the boots analogy with out some rather lax semantics around up front vs long term cost. You could also argue that any individual might get lucky/unlucky and so it's not clear cut there, but I think it would be fair to argue that in aggregate the outcome on cost is a reasonable example.
"The reason that the rich were so rich, Vimes reasoned, was because they managed to spend less money.
Take boots, for example. He earned thirty-eight dollars a month plus allowances. A really good pair of leather boots cost fifty dollars. But an affordable pair of boots, which were sort of OK for a season or two and then leaked like hell when the cardboard gave out, cost about ten dollars. Those were the kind of boots Vimes always bought, and wore until the soles were so thin that he could tell where he was in Ankh-Morpork on a foggy night by the feel of the cobbles.
But the thing was that good boots lasted for years and years. A man who could afford fifty dollars had a pair of boots that'd still be keeping his feet dry in ten years' time, while the poor man who could only afford cheap boots would have spent a hundred dollars on boots in the same time and would still have wet feet.
This was the Captain Samuel Vimes 'Boots' theory of socioeconomic unfairness."