I wrote most of the hardware kickstand bypass section on the unofficial zeromanual. Because you are messing with a sensor that connects to the MBB AND I do not know if it changes for any model year but mine, I am cautious giving any blanket approval to any unofficial modifications (hell, it could change even within the batch of my model year). The MBB is vulnerable and expensive to replace/reprogram. That being said, in an emergency (and understanding the risks) I have modified mine with a resistor as that is the same way most KTM bypass kits work. If you connect the resistor to the wrong leads, or of the wrong value it can fry the regulator in the MBB. Software modification is a better bet if you can remember to pull your kickstand up every time and need a permanent solution.
That enclosure was fully potted for my 2016 SR, so I don't think it should be an issue unless it wears through the enclosure and the potting. How bent was the kickstand and where? My sensor lost connection at the base of the connected wires where they flex the most.