Then you can never have a secret door. You can never have a riddle. You can never have a mystery.
Have you never actually RUN a mystery adventure? The worst thing in the world would be to prepare a complex intricate mystery, and have the players miss the first few clues; half an hour in and they're standing around going "What the hell are we suppose to do? THIS SUCKS."
If there is a mystery they must solve in order to resolve the adventure then YES, you guarantee, somehow, that the players WILL solve it. If the secret door leads to something they MUST do, or have, or know, then you guarantee that they WILL find it. If the players NEED to figure it out in order to move forward, than failure to figure it out means the game is over, just as surely as if you TPKd them.
Now, of course, there's always a chance, however small, of a bad run on the dice that leads to a TPK. If you're not doing a story-based campaign, hey, fine; whatever, the party fails, they pay their penalty gold or roll new characters, and see you next week. That won't fly in my game though. Don't tell my players, but they're the heroes in a story, and they WILL make it to the final climactic engagement, even if I have to re-write 3/4ths of the story on the fly to do it. But my job is to make them believe there is no such guarantee. My job as a DM is to make them believe me when I lie.
Now, I have tools to help me lie, much more powerful than fudged dice. If they fail to find the secret door that gives them the required item or the crucial clue that leads them to the truth, then they'll find it some other way; a helpful NPC will lead them back, or the item or clue will actually be carried by some enemy they encounter later, or I'll just decide that that "required" item wasn't so required after all or that the secret truth was something different than I originally wrote in my notes (or, honestly, I'd never make the whole story hinge on finding one secret door in the first place.) But whatever I do, the PCs will never know. All they'll remember is that they made it through by the skin of their teeth or figured the mystery out all by themselves, because of their own cleverness and skill.
And I'll never tell.