Please never do this. This deceptively looks smart to a game designer, but actual players read this like a book and then it feels cheap and massively unrewarding for them.
But then I noticed that the loot was entirely dynamic. I forget the exact items, but if you only use one grenade it will only generate one refill hidden around the next area. If you use all your resources though, the upcoming loot gets massively increased and you can usually get almost all of it back right away. I learned this partway through and completely changed my playstyle and really broke the immersion to see the game difficulty change in realtime. I reloaded a save and played differently, and the next area was filled with loot instead of empty. But when asking my friends what they thought, none of them noticed that the game was doing this, and they all thought it was well balanced.
On the other hand, some Mario games now will essentially have a "you are dying a lot, here is a star power up to help you out, or heres luigi to play the level for you" mechanic. For a super casual game, such a mechanic is great. Its optional. If you want to lock-in and beat the hard level, you can just not grab the powerup, or say no to the prompt. But if you are getting frustrated, you can skip the hard parts and fly through to the next level and get right back to having fun.