Instead of IR transmitter / receiver, wire directly?

As you probably guessed, you will hit a problem with the modulated signal, which will not be recognised at the receiving end. Unfortunaely for you, the signal that arrives at the IR receiver is also inverted.

It is possible to do it but you would have to make changes to the internals of the library.

Some hints (untested) for the library on the sending side only:

  • Swap mark() and space() functions and set the modulation duty cycle to 100% instead of 33.33%

isolation & grounding may also be an issue as already pointed out.

It would be much simpler to use Serial or softwareserial instead (you only need to connect Tx on the sending side to Rx on the receiving side, plus GNDs.

PS: All of the above is untested.