A "gap" seems to be almost like a crime no tech worker should dare do. I have seen otherwise rational coworkers reject resumes only for having a "gap". Most want to relax, but the same people also punish those who do just that. I thought it was a quirk of the society I live in, but from comments here, it looks like it's the norm in all countries.
I took six months off after being fired(!) (four months truly off, ~6 weeks prepping, looking for new role and interviewing). During my time off, I traveled, got healthy after years of neglect, created a couple of mildly interesting side projects, read oodles, and generally was just a man about town.
I told recruiters in month one that I was taking some time off but that I'd love to speak to them around month four. When the time came, I still had very good choices and landed a fairly coveted position.
I did have one particular worry that I guess aligns with what you're saying. I felt that if the three or four good companies I'd hit snooze on in month one all fell through and I had the explain the six month gap after the fact rather than prior to, the onus would have been on me to prove that I hadn't just been applying everywhere for six months with no takers.