No you can't. That's the opposite of environmental engagement bro, because now you no longer have an incentive to think at all. You just see "Oh a lock, I'll spam my key inventory and see if one works."
That doesn't follow. Keys in these kinds of games are distinctly marked, there would be no need to spam them to see if one works. And your scenario has nothing to do with that or incentivizing thinking, it's recognition. You come across the thing that the hula key opens, then later find the hula key, which gives you the 'aha, I saw something to do with a hula before.' There is nothing to figure out or consider there, and inventory space is not a part of that stimulus.
Nope. You don't get it. Having the memory and foresight to bring the right key to the right door, and choosing what to leave behind and which keys to take on a run and which to save for later, all take actual thought and engagement. In other words,
gameplay. Managing inventory space is absolutely, 100% part of that stimulus. Pushing the 'unlock door because I probably have the key' button is not gameplay. It's OK if you think they are equal, but if you do, you are stupid and wrong.