Whatsapp databases
In order to merge databases (msgstore.db.crypt12) you need the key.
Decrypting the message store database
The easiest way to get the key on a rooted device with whatsapp still installed. You can find the key in /data/data/com.whatsapp/files/key.
You can then use an app like omnicrypt (no longer on Google play) to decrypt it. See [1] (don't know if this is obsolete)
OR you can try using adb and the Whatsapp key/db extractor
OR you can try extracting the data from Google Drive, but the Whatsapp Google Drive Extratctor doesn't seem to work any more
If your old device doesn't have the key any more
You can still get a new key by backing up your old databases (/sdcard/WhatsApp/Databases) and then putting the old database you want to look at
Reading the decrypted database
Use SQLite browser
Whatsapp viewer (also exports to txt html json and allows you to search messages - originally from [3]
Merging databases
By updating the IDs from a hand decrypted database using SQLite viewer
Using Java apps after having deduped the databases in SQLite viewer