I had the issue with Unreale not detecting my gamepad (Logitech Rumblepad 2).
Read some forums and it had something to do with unreal expecting XInput from controller, but not all of them supports that. But there is a workaround for that - there is programm x360ce, which translates inputs from your controller to required format.
Make sure that if you try this you get version of x360ce which coresponds with Unreal version you’re using (e.g x32 or x64)
And then place files it generates in (I also placed .exe file there, might not be necessary)