As sibling notes, macs can install themselves over the internet from firmware, which sounds like exactly what you want.
Macs can also boot in target disk mode, which does need another computer but also trivializes certain recovery tasks.
Several systems (Android, at least some PCs, I think Chromebooks) have either 2 root filesystems or a recovery system on their disk that can reinstall the main OS. This is weaker but still useful.
You can flash iPXE to a network card and use that to boot a PC over the internet kind of like a mac with more steps.
Coreboot can take arbitrary payloads; if your device has enough flash you could easily include GRUB, FreeDOS, and a BASIC/LISP/etc.