In a hyper inflationary scenario, the price of stocks goes up just as dramatically as everything else. You’ll be seeing the Dow at 100,000 and it won’t mean a damned thing when rent for a 2 bedroom flat in an average part of town costs $6,000 a month, and bread costs $7 a loaf - on the way to $60,000 a month rent at $70 loaves of bread.
Your scenerio is what happens if everyone buys stocks. In order to prepare for that possibility about the only thing to do is have all major purchases done and for the lucky few have the means to be self sufficient.