I do this, except without the foolery. I schedule recurring blocks on my calendar like "Focus time" and "Personal time" so people know that scheduling meetings with me during those blocks may not result in my attendance.
And when people inevitably didn't ask, I'd just decline unless I especially wanted to attend. I find myself getting invited to meetings sometimes just because the organizer wants to be inclusive and make sure everyone is looped in who might want to be, and I figure that's what's going on if they added me without asking.
If it's really important for me to be there, they'll see my time block and ask me.
I have several of these ‘out of office’ events recurring in my calendar that I use for concentrated work