I know this post is a couple months old, but I've just set up moonlight today on my Retro-Pie setup, using the same controller, and ran into a similar (if not the same) issue... But I managed to come up with a solution which (I think) will hopefully help others.
Long story short, I replaced the line matching the controller's ID (030000005e040000dd02000003020000) in /usr/share/moonlight/gamecontrollerdb.txt with this:
030000005e040000dd02000003020000,Microsoft X-Box One pad (Firmware 2015),platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b8,guide:b10,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,
When I start moonlight it outputs an error about the config not being correct now, but it actually works (button mappings matched what Steam/games wanted, with no manual config necessary within steam or games).
I came up with this mapping by running the SDL "controllermap" utility. I compiled it using the steps laid out here
Now it's very possible I did something wrong, but when I ran controllermap, all I got was a blank screen (apparently you're supposed to see prompts asking you to assign/map buttons, but I never saw this). The first time I ran it I just mashed buttons until it exited. What this accomplished was it allowed me to get an idea of what order it took the inputs (based on the order it output them in the configuration string that was output when controllermap exited. Then, using this order as a reference, I ran controllermap again I pressed the buttons/joysticks in the order seen in the configuration string. This time controllermap output the string I included above. Then, as I said, I replaced the existing mapping in moonlight's config file. Then I rebooted (probably unnecessary) and launched moonlight again, and my controller was working.