How does Whatsapp store the chats and contacts of any given user, and are they recovered if one installs Whatsapp on a different phone? I currently have a Nokia Lumia, with Windows Phone 8.1 installed, and an Asus Zenfone 5, with Android 5.1 Lollipop. Both of them are old and outdated, but the Lumia is horribly so. In fact, I almost exclusively use the Zenfone, and I've kept the Lumia because of one thing only: I do not want to lose my Whatsapp chats and contacts.

Now, though, after the launching of Whatsapp Web, it seems to me that these things are actually backed up on the Whatsapp cloud, and that it would be safe to toss the Lumia and install Whatsapp on the Zenfone. Actually, to be honest, I'm thinking of getting a new phone entirely, and leaving both of these obsolete devices.

My question is, should I get a new phone and install Whatsapp on that device, when I desperately want to keep all my chats and contacts that I have on my Lumia?

Thanks in advance for any advice!
Your data is stored on the device and encrypted using either an encryption key that is also in the device or a key generated based on your account. The best advice is to do as whatsapp suggests and before you uninstall anything, you make from the Windows phone a copy/back-up on your cloud (google-account). It is under options/back up. Then (re)install whatsapp on the Android and import the data from the cloud. Confirm the number and done!

Or you can try exporting a database on an SD and then try to import that on the Android, but that is definitely not suggested. It seems to never work. There are some discussions here on the matter.