Is there a way to merge Safari history databases?
Keep one set in Safari and insert the other into another browser and then import it in Safari.
Chrome should work fine for that. https://github.com/Roman2K/hist_safari2chrome
Create a db file for Chrome and replace the empty one under the folder for Chromium in ~/Library.
Quit Chrome and import History in Safari.

Better way is to use sqlite to merge them.. but I'm illiterate in that language.