Would someone in a STEM field and of average intelligence be capable of completing a quality PhD? If the goal is to produce original research, is such a person likely to be capable of priding truly original work? Especially for fields that are more mature and much of the low hanging fruit plucked? Or would it be more likely that they struggle to understand the context and knowledge required to work on the bleeding edge of their respective field, ultimately leading to them dropping out, or producing barely novel work.
For the context and knowledge, that's where a having a good advisor, paper seminars, talking with more senior students, etc. can help.
When I think of an ideal PhD candidate and for the record I am definitely not PhD material, it requires the spark of ingenuity, the work ethic to hash out the viability of an idea and the ability to convey that idea in a coherent manner such that others can grasp the concept being offered and either accept or reject it.
I wish I could study for a PhD in philosophical theology as I believe I have the imagination, but the areas of work ethic and clear communication I find myself lacking what would be required.
Money?
Prestige?
Advance the profession?
To teach others?
In the STEM fields, it is hard to justify the time, effort and money required in terms of objective financial return on investment. You'll need some altruistic motive to make it a semi-rational goal.