I was once stuck on a box that didn’t even have ed, and I needed to edit a file. This is maybe 1995 and it’s an HP/UX machine that was used as nothing more than an X console, but its fstab or automount config was messed up so it couldn’t boot anything but single user mode.
I managed to cobble together an “editor” with just the shell that as I recall read each line of the existing file and echoed it to stdout. I could press return to keep it as is or retype the entire line with whatever changes I needed. The output went to a new file. When I was done I copied the new file into place.
Another time I needed to transfer an executable to a server I could access only over serial console. On the receiving end, I think uudecode was all I had to safely get the binary over serial console.
Fun times.