I used a cheap relay board that I happened to have on hand. These are well under $2 from the usual sources (example: https://www.gearbest.com/relays/pp_226384.html?currency=USD). Yes relays are low tech but there were a couple of things in favor of it.
1) The screw terminals could be wired in series with a NC endstop or in parallel with a NO endstop. That means you could disconnect the relay and still use the printer's normal end stop. When using the sensor, you'd back off the end stop poker and it becomes a "backup safety." so if the sensor doesn't work (e.g., off the edge of the bed) you don't just drive downward forever.
2) The 3 pin connector just happens to be wired like a 3 pin PC fan. This makes it really simple to provide 12V to the board and the sensor, with cheap cabling you probably have on hand. If you have an extra fan port, great. If not, you can wire one end right to the power supply or do what I did. My printer has PC-style Molex connectors for power input (originally it took an ATX supply) and you can buy a little "tap" that is a double-ended Molex with a 3-pin fan wire coming out of it. For example: https://www.amazon.com/Cables-Unlimited-3-Pin-Connector-FAN-CABLE/dp/B000V6T5HW
3) You can accommodate NPN (normally open) and PNP (normally closed) probes by switching the NO/NC contacts.
4) Great isolation.
The relay doesn't switch much. Just when you probe the bed or printing the first layer or two. After that it is off, so it isn't getting a constant workout, which is good.
The project pretty much works itself out now. For the Printrbot, I cut one wire from the NC endstop and wired the common and NC contact of the relay so that the current passed through the switch and the relay. If you have a NO endstop, you'd wire in parallel to the existing endstop and not cut any wires.
On the other side, you can use a cable like this: https://www.amazon.com/Computer-Y-Splitter-Power-Connector-Adapter/dp/B00957SY6G or just make one that works for you. One end goes to the fan power connector. The other end goes to the relay board. Then cut the connector off the remaining end and wire the sensor's wires in. The yellow wire is signal, so you can cut the one going to the fan power connector, if you like. Most of them won't have a connection there, anyway.
I stuck the relay board to the chassis with a bit of 3M Command tape, and done.
I'll attach a picture shortly, if I haven't already.
Now, you have to figure out the software, but that's another issue.