My experience with real world (but still academic) data has been that there is lots of magic---feature selection to be specific.
(I'm not disagreeing, just referring to a different kind of "magic")
Everything else matters, but when your ML doesn't work it's 100% a feature selection problem. Which usually means it's 99% a problem of getting lots of domain expertise jammed up against a lot of ML experience and mathematical understanding. It's also a bear.