What are the potential pitfalls of having a PhD in machine learning?
As a person who has hired quite a few people in industry, I will simply say that advanced areas (or even areas that are perceived to be advanced) often see PhDs being preferable. In this respect I completely agree with Bitwise.

I do not, however, agree that you might earn less. Those with sought-after skills get paid well in industry. It is about supply and demand but supply (people who can do the job) is not high and demand is growing.

Machine-learning is hot in the business literature. That is, managers are becoming well informed about the potentials of machine-learning and they are becoming worried that the only way they can compete for the long-term is by taking advantage of this area.

While lower-level programming jobs might not see any benefit from higher qualifications, areas like machine-learning are not seen as lower-level.

To answer your main question, are there pitfalls of having a PhD if you want a job in industry? The answer is no. I am unaware of anyone who has ever thought lower of a job candidate because they have a PhD. Yes, you could get a job without one but for your areas of interest, a PhD will give you lots of advantage when it comes to getting job offers.