The Daisy Patch, and Daisy Field have a reference circuit for this, here is a link to the patch schematic.
The MIDI output circuit is up in the top right of page one, and you’ll notice it is really simple (only two resistors)!
This is for TRS MIDI, but the same circuit would apply to 5-pin DIN, just to the corresponding pins.
Hardware MIDI essentially creates a current loop between the two devices, which is why you’ll see optocouplers, etc. involved on the input side, but the output can remain pretty simple.