Is my reasoning about an ATMega328p connected to equipment requiring an open-drain pin correct?
Your "fake open drain" code (switching between low and high-Z) can indeed work as long as the supply voltage of the microcontroller is the same or higher than the voltage at that interface connection which requires the open drain.

If this condition is not met (the microcontroller uses a lower voltage) then the ESD diodes inside the microcontroller will start to conduct:







simulate this circuit &ndash; Schematic created using CircuitLab

To fix that I would try this:







simulate this circuit

For the NMOSFET I would start with a 2N7000, any other N-channel MOSFET might work as well as long as it has a low enough threshold voltage. Not that this inverts the behavior, if the microcontroller outputs a "1" then the NMOSFET will be "on" which will pull the input of the other device "low".