Just to be sure I close this thread here as I did on Reddit:
The problem of keyboard lag showed up on my laptop and a second ancillary laptop I keep in the kitchen. So it wasn't related to a particular machine.
The culprit was a smart folder. I have several but just one caused the problem. It was a smart folder configured to show me notes that were untagged.
It had about 227 notes—not as many as in my other smart folders—but I confirmed by deleting and recreating this folder that it caused to keyboard lag.
I finally connected with a second-level support at Apple. I was disappointed that they wouldn't proceed until I reinstalled the OS. As the problem existed on two machines, that was a clear waste of time.
Anyway, no more untagged notes smart folder and no more keyboard lag.