History files are stored in metafied form,
But how does a literal character from the command turn into a token in the metafied form? That seems like a confusion of levels that shouldn't be possible.
FWIW, the problem goes away after starting a new shell, even keeping the histfile. So the corruption doesn't seem to be happening on disk.