But, when it comes to oil production what I would say is that due to the overlapping geography of the foundation and consequent spread of Islam and largest and easiest to extract oil resources in the world being very large combined with human tendency to overfit pattern matching that it is all too easy to see why some would conflate the two.
But Islamic majority nations aren't the only "oil countries", and not all "oil countries" are corrupt (but I'd guess the overwhelming majority of "oil countries" are corrupt, not least because of Dutch Disease).
I'm aware that there are non Islamic "oil countries" of course and I don't think the GP comment was equating oil with Islam. It's just something that does happen in other contexts and that we should be aware of when speaking, because there are very real real would consequences.