We have a script to import user data from ZNC, but it can only be used by administrators.
It would be nice to use the upcoming soju.im/bouncer-networks
extension to allow this script to work for regular users. It would also be nice to allow the script to export user data as well.
https://sr.ht/~emersion/chathistorysync can be used to export chat history.