Hello. I have been bragging on 2 printers that I have recently reworked. I run both with marlin 2.x one runs a bltouch and the other runs a npn proximity switch a lot like what you have. It is a simple change in marlin to comment out BLTouch and setup for a fixed Z probe. Honestly if you ask me the 2.x firmware with the support for all the newer drivers is really meant for the 32 bit controllers. Or at least that is the way the world is trending anyways. Have you considered a 32 bit controller, yet? Like the SKR 1.4 or 1.4 Turbo? these controllers are dirt cheap and bring big time improvments to your machine. And if paired with a 24v power supply and a set of tmc2209 drivers you could really bring that printer up to speed. Literally. I mean to update the firmware on the old Arduino mega/ramps combined boards does little for those random blobs in our prints from the printers motions momentarily pausing while the 8 bit controller tries top resolve its math calculations. 32 bit controller, tmc2209 run in uart with a 24v power supply and learn how to configure marlin yourself. It is PAINFULLY easy if you just try it. Or go find a tutorial on youtube.