If you can get the computer alive to the point where you can remotely log into a shell, older Macs have a "srm" (secure remove) command that does the whole overwriting thing as well as "secure empty trash" thing. They've removed that command in more recent Macs, but that shouldn't be an issue for you.

https://www.macworld.com/article/3005796...el-capitan.html