I recently corrupted my zsh history and was facing this error.

After a reboot, I started seeing a message when loading the shell:

zsh: corrupt history file /home/myusername/.zsh_history

I fixed it using:

mv .zsh_history .zsh_history_bad

strings .zsh_history_bad > .zsh_history

fc -R .zsh_history