In an important sense, getting a Ph.D. is fast and easy. Basically there are just two steps: (1) Take and pass the qualifying exams. (2) Submit some research that is "an original contribution to knowledge worthy of publication" and where the criteria for publication are "new, correct, and significant".

For nearly everyone who enters a STEM field graduate program, both (A) and (B) are challenging.

A Ph.D. is a research degree. Usually the research part is the most difficult part. Research is difficult enough with good help at a good graduate program that is trying to teach, say, via research level courses, seminars, examples, advice, how to do research. Trying to be good at research without that help is still more difficult.

In D. Knuth's The TeXBook on his mathematical typesetting system TeX is

"The traditional way is to put off all creative aspects until the last part of graduate school. For seventeen or more years, a student is taught examsmanship, then suddenly after passing enough exams in graduate school he's told to do something original."

So, right, this little statement is dripping with emotional tension of the poor student having long, say, from kindergarten, done really well, say, straight As, at what their parents, teachers, and fellow students highly respected and, then, suddenly being asked, under high threat of failure, the first in their academic life, possibly an emotionally catastrophic failure, to do something that is to them, and most people, quite different from anything they or their parents, teachers, or fellow students did, saw, or understood since kindergarten.

In that sense, a better student was the one who, say, in plane geometry in high school, loved the material, slept in class, finished the text in the first few weeks of the course, fathomed everything on geometry in the school library before Thanksgiving, thought that the teacher was an idiot or at least largely ignorant of geometry, started on topology, looked at the work of A. Gleason at Harvard, noticed the Hilbert problem Gleason solved, quickly taught himself some group theory to understand what Gleason was saying about symmetry in geometry, saw exterior algebra, and then rushed into calculus to have enough to understand the inverse and implicit function theorems, differential geometry, and the role there of exterior algebra, .... Did I mention, in high school geometry class, he usually had his head down asleep? Actually with a little guidance and encouragement, all that is quite feasible.

Maybe there is no royal road to math. But in a STEM field at a high end university, there is a royal road, at least a red carpet, to a Ph.D.: Do some good RESEARCH. If there is any doubt about the quality, then submit it for publication at a good journal. Do that and usually will get treated with high respect.

For the OP, I can believe that there are five open computer science professor job slots at research universities for each NSF, DARPA, etc. research grant funded by Congress. So, the bottleneck is not really the number of students but the number of research grants. So address all complaints to Congress.

The role of the grants? Bluntly a tenured prof is not an expense to a university but a great customer. The professor gets research grants, and usually ballpark 60% of the grant goes to the university as "overhead" and the rest goes to cover the professor's salary, research equipment, travel expenses, graduate student support, etc. So, really the prof is working for the NSF, not the university.

So, such a prof is something like a free agent in professional sports: E.g., if Lebron joins a team and helps them get an NBA title, then the ticket sales, TV rights, etc. for the team will more than pay for Lebron's salary. Really, then, Lebron is an independent businessman. Similarly for a tenured full professor of research in computer science.

So, if a person in computing is to be an independent businessman, then maybe instead of a professor slot they should do a startup. I came to that conclusion.