Lawyers deal with confidential client information and we have a duty to secure that information. No matter who you are, you wouldn’t want to donate, give away or even discard a computer or phone with information still on the device. No one would want to transfer a computer or phone without making certain the personal information on it is wiped.
In the old days, I could confidently send lawyers off to Darik’s Boot and Nuke at https://dban.org/ after warning them to be cautious with whatever media they installed the tool on, lest they accidentally nuke something they did not intend to destroy. DBAN doesn’t work on SSD drives, so the company now sells a commercial product to wipe those drives.
The respected tech website Wirecutter published an excellent guide How to Securely Wipe Your Computer, Phone, or Tablet. You may want to bookmark this guide so you will have it handy when you need it.
So, what about a dead computer? If a computer is operational, you can reformat the hard drive. But if not, a simple solution is to do an internet search to find instructions how to remove the hard drive from your model of computer and remove it before recycling or discarding the computer. Then you can physically destroy the hard drive. My son and I used to have some fun figuring out creative ways to physically destroy retired hard drives.