What is the best way to import thousands of processing histories into my primary darktable database?

Yes - that is on the Laptop for only the photos edited & processed while traveling.

All the photos taken during the trip are then downloaded directly from the SD cards by the home NAS to the NAS share when I get back home after the trip. There are no xmp files on the camera’s SD cards.

The xmp files are on the Laptop - not on the NAS as the photo files from the Laptop are not copied to the NAS. I can copy the xmp files to the desktop…

There is a darktable config option of “look for updated xmp files on startup” - but it seems that it expects the xmp files to be in the same dir as the raw photos. And that the timestamp has changed.

I’ve played around with a local filmroll on the desktop and from what I could make out - darktable expected that the xmp already exists and only brings in the new edit & processing history if the xmp file timestamp is newer than the database timestamp. This would not be the case - as the editing & processing on the Laptop would have been a few weeks before the photos were added to the home desktop darktable database. So the desktop database is by timestamp the latest.