I experimented with this a few years ago. Since I was making a saison I figured if the wort soured a little before the boil then it wouldn't be an issue. I mashed, sparged, boiled for 30 minutes, added some fermcap (foam control) and put the lid on the kettle while it was still boiling (the lid was already cleaned and sanitized). I left the lid on for a few seconds and would then check to see if the foam/hot break was rising. After doing this a few times I left the lid on for about ten seconds and then stopped boiling. I let the wort sort like this for 3 days. On my final brewday I tasted the wort and it had not soured at all. Since then I've done this many times with all kinds of different styles and have yet to have an issue. Being that the wort is essentially sterile from boiling for 30 minutes and the lid has been cleaned, sanitized and steam sterilized from the boil then there isn't really any way for bacteria to find it's way into the kettle. As long as you keep the lid in place.