this is for an existing PCB with a SOT23 footprint.
You could bodge a 74LVC1G14 in SOT25-5 (single Schmitt trigger inverter) in the SOT23-3 footprint for 2N7002H. The two footprints have the same size, just a different number of pins,
D + Y [SOT23] [SOT25] G S * A -so by shifting the SOT25 left by 0.95mm (half the distance between G and S) you get A=G (input) and Y=D (output, inverted). -=S needs to be bridged (the pin is directly opposite to D, so very close to S), and you need to provide the VCC to the + pin, and you might even add a 100nF cap between + and - for supply noise induced in the VCC bodge wire. * is not connected in the 74LVC1G14.
It is a bodge, but doable, I believe. (This is the reason I like SOT23 and SOT25: small, but not so small you cannot bodge or dead-bug it.)
Personally, for open drain inputs and outputs, I prefer to use
NXP NX138AK in SOT-23, like in
this dual 12V PWM fan controller (where the tachometer output is two pulses per rotation with an open collector output with a pull-up to 12V, and PWM input is an open collector input at 25 kHz). Simulating in KiCAD/ngspice indicates 125kHz yields very nice output using your nmos circuit. The rise time I get with 10k pull-up to 3.3V is about 160ns; with a 4.7k pull-up to 3.3V, it halves to about 80ns. I don't have suitable test equipment to actually measure it in real life, though.