As Nanirourou stated already: there is no overall truth regarding the current input device debate.
Gamepads have, as already stated, much less buttons, analouge input, so they are easier to use, and modern ones have good, comfortable shapes. The keyboard and mouse combination has benefits like more keys (more possible inputs and combinations), a pointing device (mouse), the mouse wheel and so on. On touch devices, the player can actually touch things, draw, or make gestures.
It is certainly possible to emulate one kind of input with another one (moving the pointer/cursor/crosshair with an analogous input, "analogous" input with interpolated digital input or key combinations, virtual buttons on a touch screen, and so on), but in most cases, this comes with some drawbacks, and some are worth than others. It takes time to move a cursor without mouse/touch input, 8-direction movement with keys is less precise and, depending on the game, just doesn't feel good, and by far the worst, any kind of virtual inputs on a touch screen, especially if the inputs have a fixed position.
For games, it's not that much about what input device has the most benefits or drawbacks and is the best input device for all games, but it's rather more about what kind of input is most suited for a game, or how to implement the controls for a given input device.
In my opinion, controlling a character with a gamepad feels better, but in some games, using e. g. keyboard and mouse is just better (in most Mobas), and in other games, you wouldn't even consider to use a gamepad to controll your character (turn based games, strategy games, ...). Using analogous input to control your vehicle in a racing games is good (and certainly better than using keys), but motion controls (rotating your controller) are even better.
Some lazy developers try to put games on mobile devices they already made on other platforms, without thinking to much about the controls. This way you'll get virtual inputs instead of motion controls, buttons instead of e. g. screen taps, swipes, or gestures, and completely improper controls (controls requiring "key" combinations or sequences). And improper controls are the reason why touch input is badly perceived. The guys of the YouTube channel did a video about touch input, and the pitfalls related to designing games for touch screens.
While playing games, I'd choose a Gamepad (if available) over Keyboard and Mouse in most cases. The reason is: most gamepad supporting games are better played with a gamepad. Most, but not all of them. I played e. g. Counter Strike Source, League of Legends, and Magicka: Wizard Wars and never thought "I'd like to play these games on a Gamepad".
... But this is just my opinion.