If you go threw the following post and read down it outlines how to perform this particular kind of remap. You will actually see the file in that thread we are using to perform the remaps on the OSMC remotes (osmcrf.hwdb). I assume you could probably just copy that making sure the file name starts later in the alphabet to make it load after (I’m guessing that will make it load last).
I would think in your case that the Kodi is going to be intercepting the button presses and so this won’t work with Kodi running. I once did the Kodi map to a python script like Sam mentioned above. I unfortunately didn’t keep my files or notes. I did get it to work, but it was not very useable as there was a rather significant delay between each volume press and it was just a mess to actually use.