I haven't been particularly following the discussion about toggle-split direction, but I think I see things a little different to you.
The Bash history facility (for example) use a file (~/.bash-history by default) which stores the last N commands entered. So I had in mind something similar, which could be loaded at the start of a session, maintained as commands are entered and executed, and saved before exit. I would keep the number of commands stored relatively small (N = 50 or 100, perhaps).
The 'problem' then would be: how, at the start of a session say, would the commands in @data command-history be 'reconciled' with the contents of the .history file? One could imagine them being concatenated, but other schemes are possible, and I am not sure there is a definitively best answer.
Jon N