In what way does the process described "not seem to work"? It requires a fair amount of time and temporary disk space, but it is fairly straightforward. You can even do it in stages (export an album or any handy subset of the source library to a temporary Finder folder, import the result, erase/empty the temporary folder, export another clump, import it, et cetera) if exporting or importing 20,000 items at a time seems too much for you.
If you are willing to consider a third-party solution, the paid application PowerPhotos has a "Merge Libraries" function. It can even deal with duplicates during the merge, in several different ways.
See https://www.fatcatsoftware.com/powerphotos/VersionedDocs/v4/merge_libraries.html for information about their merge function. [I have no interest in PowerPhotos except as a user. Note that I have not tested the merge function, so I cannot say how well it works or how efficient it is.]
If you are still on macOS 10.14 (as shown in the footnote of your post), note that PowerPhotos cannot keep originals and modified photos connected with their reversible edits intact unless you are running at least macOS 10.15.
PowerPhotos is often recommended here for its duplicate handling facilities, so you may want to use it for that even if you don't use it for the actual merge.