I've been given an advice by a writer. The advice is to only tell the reader a character's plan if it's going to fail
I was told this is an incredibly useful advice. The rationale is that if your character is going to fail, then knowing the plan ahead of time and watching it fall apart is driving the tension. However, if a plan is going to succeed, it's more fun and tension-building for the reader to figure it out alongside the characters.
Now, the question is whether it makes sense to tell the reader the character's plan if it's going to fail, and in what circumstance it would make sense to do so. I believe there are many viewpoints, and I am trying to see if there might be circumstances where it may make sense? I am thinking that if everyone does that then people may know the plan is going to not fail in advance and make the story bad since essentially they will know the end of the story or subplot well in advance.