I think you're on the right track with the external case, as I've had a positive result by doing that in the past. If it works, don't worry that it may seem to take forever to boot up.
Also, make sure you have a new drive installed to install macOS onto (which should be done either from an external drive (USB stick) or Recovery Mode, before you crank up the faulty drive. Sometimes the heat of an overworked drive will make it crash. From that point on, you should just be able to use Migration Assistant. (fingers crossed!!)
Years ago, freezing the bad drive in certain cases would make it temporarily work again and so long as you keep the moisture out of it from condensation, couldn't hurt. see
https://dtidatarecovery.com/failing-hard-drives-and-the-freezer-technique-revisited/
In a worst case scenario, if it doesn't work and you really need the data, there are recovery services, although pricey.
You should add an external drive backup/cloning solution with a program like Carbon Copy Cloner or SuperDuper and/or a cloud backup like iCloud or Backblaze to your current procedures. They only back up the data you tell them too, and at least CCC that I know of, checks that the data is not corrupted.
Good luck