Canceling ZFS zpool replace when a new drive fails

In my case I had a bad SATA cable instead of a bad drive, but the end result was the same: a failed zpool replace.

It’s surprisingly easy to fix:
zpool detach /path/to/device

After this it will keep resilvering without the new device, but that didn’t stop me from replacing the bad cable, reinitializing the drive, and doing another zpool replace that started without delay.