Supply and demand plays a large part into why I believe the "PhD is not a good idea" comes across. To be fair, a PhD will probably NEVER hurt your chances. It's more whether it will HELP your chances. I find what's best is to demonstrate exactly what each degree provides in a theoretical job application.
A BS in CS, MS in CS, and PhD in Machine Learning (with BS/MS in CS) all apply to a job that is asking for computer science skills.
The BS provides programming at a basic level and maybe a few upper level skills.
The MS provides what the BS does along with additional experience in concepts such as the development cycle. He may have also had some work experience.
The PhD provides what the MS does plus a research in the background of machine learning (probably not applicable to most jobs).
The PhD really doesn't offer significantly more in a practical sense. The PhD can still get the job, but the advantage the PhD has over the MS is much smaller than the MS over the BS. If the MS will do, it may depreciate the value of the PhD (it won't hurt you, but it won't help you as much). When you're competing for the same Master's-level equivalent position, you're in a very big pool of potential candidates, given how there are naturally more MS holders than PhD holders.
Now we'll take the same candidates, and apply the same people to a machine learning job instead.
The BS has probably never heard of machine learning or taken a class.
The MS may have one class worth of experience in machine learning. It would be quite rare for an MS to have work experience with machine learning as well.
The PhD has dedicated a significant amount of time in machine learning. Probably knows everything about theory, and has written his own software.
In this case, the PhD has significantly more experience simply due to his field of study. Probably the only candidate, or one of a few, and has an actual machine learning background.
If you plan to get a PhD in machine learning and then decide to code general enterprise environment software, it's not going to help. If you get that PhD and then decide to work in a cutting-edge environment that actually implements machine learning, you'll probably be the top candidate. Also keep in mind that there are far more general development jobs than there are for machine-learning.