Currently it is possible to stupidly lose mempool data by calling the rpc “savemempool” before the previous stored mempool has been read and processed to the memory mempool.
I haven’t looked at the code yet, but at minimum one ugly solution would be to have a global g_is_mempool_read_finished (or something of the short) that starts false and gets sets to true once the reading is reading processing of mempool.dat is successfully finished. The rpc savemempool checks this global on the start and returns a an error while it remains false.