For hyperinflation, the best thing to do is to borrow today’s dollars at low (fixed) interest rates, buy hard assets whose value will go up in significantly in dollar terms due to the hyperinflation and sell these in the future to pay back your loans in substantially weaker dollars. Some of these assets would include gold and real estate.
Unfortunately, if you are wrong and we are in a disinflationary or deflationary environment you would be hosed.