This app was mentioned in 3 comments, with an average of 1.67 upvotes
I don't think it is possible on a iOS device. The easiest way I can think of is to migrate your chats to an Android device and use the the app Backup Text for Whats. You can choose to save your chat in an HTML file with all media attached to it.
I use this app for years now and as far as I know there is no limit.
just a heads up, what's app let's you only export 10 thousand messages per chat, making it pretty useless for people like me that have chats with 100k messages per year.
if you have a rooted phone you can use THIS APP to export the chats. Simply export and mass edit them to fit the requirements of the visualizer of your choice.
if youre not rooted, you have the manually decrypt them urself with a handful of third-party software. but at the point just get root haha
The export function only exports the last 10.000 messages. You can try third party apps in the Play store that are capable of exporting all messages. You can try this one if you have root: https://play.google.com/store/apps/details?id=com.smeiti.wstotext