I second TD's recommendation to use PowerPhotos to merge libraries. But it will only be a nearly lossless merge, if you are running macOS 10.15 Catalina. Before macOS 10.15.1 it has not been possible to move the edited versions of your photos paired with the originals, so you can revert the adjustments individually after merging the libraries. Also, Power Photos cannot move items between libraries if you are using iCloud Photos with "Optimise Mac Storage".
If you have an older system version or are using iCloud Photos with Optimise Storage, consider to merge the libraries in iCloud. Syncing both libraries, one after the other, with iCloud Photo to will merge the libraries in iCloud and the merged library will download from iCloud back to the currently used iCloud Photos Library.