I used to write code back in the beginning of personal computing and also electronic circuit design on my way to an Electronics degree. But then I went to work for Chevrolet, building engines until I retired. I can barely program my VCR. Not that I need that talent much anymore.
A possible fix would be to remove the wire leads from the reverse switch and put in another switch then switch on demand. Not my first choice