Convert all compatible wordpress tables to utf8mb4 https://developer.wordpress.org/reference/functions/maybe_convert_table_to_utf8mb4/
Copy the function on the php file to your theme or some plugin, then run the sh file on the root of your site directory. You must have wp-cli installed and working for it to work.