There was a way you could burn out a chip in the C64 with a poke command IIRC. And you could break the tape advance relay in the MSX by switching it on and off rapidly.
Edit: Oops it wasn't the 64 but the PET: https://dfarq.homeip.net/the-killer-poke-for-the-commodore-p...
Also, everyone here will know the phenomenon of bricking. You can damage hardware with software. Luckily it's very rare.