I've been using atuin happily for a few years now and it blows bash history out of the water.
I have far more confidence in atuin handling race-conditions and upserts than in my bash-spagetti not doing that.
Also, fzf, has a better append-history, but even there I managed to get it into some race-condition now and again. I presume it has to do with when the append happens: after the command ran and finished vs when I hit enter? Again, I don't know the details, and frankly, don't really want to know them either, if I can just lean on a tool by people who truly understand the problem.
Good, but even better (IMHO) is to write one history file for each terminal window, shell and level as in
export HISTFILE=$HOME/.history/${TTY##*/}.$SHLVL
And then I tell zsh to add timestamps setopt APPENDHISTORY # don't overwrite HISTFILE
setopt EXTENDEDHISTORY # add timestamps to HISTFILE
setopt HISTIGNORESPACE # aka setopt -g
set HIST_FIND_NO_DUPS # don't show duplicates on ctrl-RNow I can grep my history and, based on other work notes I take, can even limit my search by date/time if needed.