There are two aspects to this. The cable for the physical connection and the driver for the communications protocol.
I suspect with adaptor upon adaptor you are either losing voltage and therefore connectivity or the protocol is getting confused.
Your core problem will lie in the communications protocols. There is a defined USB protocol to which peripherals such as keyboards must comply. The old IBM keyboard clearly doesn't. The host computer will interrogate a USB device using a Setup Token Packet. A USB keyboard will respond, the XT keyboard will not.
PS/2 to USB converters, and other USB converters, usually have a small embedded processor that handles the protocol.
Writing a USB driver on your new PC to bypass the USB protocol is probably impossible as the USB ports are likely to be driven by a dedicated chip.
Cutting the PS/2 connector off your USB-PS/2 adaptor and soldering the wires directly to the DIN plug - in the hope that the voltage loss is reduced and so the flakiness you describe goes away is very risky. Also, the protocol chip may be in the PS/2 plug!
Although the pinouts are not too bad. The IBM DIN and PS/2 sockets have pins as below:
3: Reserved (in practice, usually a reset line)
I would suggest: Use a USB-RS232 adaptor and wire the DIN plug to a DB25 or DB9 RS232. The keyboard will then appear to the PC as being on a standard COM port. You then write a keyboard driver for your new PC that converts the data stream from the old keyboard. You may be able to then redirect COM1 to STDIN.
The protocol is summarised as (taken from this description):
Keyboard - PC
When the keyboard has a byte to send to the computer (a keystroke), it shifts 9 bits out to the data line (RxD) with nine clock pulses on the CLK line.
The data format is 1 start bit, followed by 8 data bits.
The baud rate is roughly 2000 bits per second.
The byte sent represents the scan code of the pressed key or a response to a command.
PC to Keyboard:
ED <byte> Set LEDs depending on byte
bit 0 is Scroll lock
bit 1 is Num lock
bit 2 is Caps lock
EE Echo EE
F0 <mode> Select mode 1, 2 or 3
F2 Send keyboard I.D.
F3 <byte> Set repeat delay and rate
byte is: 0ddbbaaa
delay is (dd+1)*250 msec
rate is (8+aaa)*2^bb*4 msec
F4 Clear buffer
F5 Restore default settings and wait for enable
F6 Restore default settings
FE Error- please retransmit
FF Reset keyboard
I have heard of people trying to achieve this feat by putting a Raspberry Pi or Arduino between the keyboard and PC as a protocol converter. But I don't know of any "How To" guide for this.
The upshot of this is that it isn't trivial. Good luck.