Thank you Sophia and Roman for your advice.
I followed your instructions to do a clean install, but I got the error "Error URL invalid". Fortunately, I found a solution to this Onedrive specific error at OneDrive Sync issues
My Joplin is working again encrypted. Thanks again