Good idea with one major flaw - we saw the Doctor scribbling on blackboards and apparently researching thst "perfect hiding" ability in books BEFORE Clara appeared anywhere in the episode - so it was clear that it was his "pet project".
In theory, she could have said or done something "off camera" but that's really pushing the boundaries of reasoning - with that "tool", literally anything becomes 100% possible because you're effectively writing another scene that changes the context of the entire episode (e.g. - I could say that he'd had "space flu" last Thursday and imagined the whole thing in a fever)
And the big one ...
Contrary to his constant effort to scare other people (don't forget, we KNOW that he stole the man's coffee after doing his "Where do the coffee go" routine) - there was actually nothing in the barn-kid's experience that would leave him afraid of what was under the bed - more likely he'd spent his entire teens checking under his bed every night in the hope that the lady with the nice bumps had come back. If anything said or done by Clara suddenly had him thinking "it was HER under my bed", why would he suddenly become frightened of that "bogeyman".
I will never believe that the Doctor is afraid of bogeymen. Even if he believed they exist, he'd be trying to find one to talk to it and see what it wants - his entire personality os based around insatiable curiosity - it's not in his nature to say "I don't want to know".