Looking back, we only had two guys in our class that went for Ph.D - both ended up doing a Ph.D in ML, coming from electrical engineering. This was back when ImageNet changed the scene. Both were
extremely sharp. One of them ended up leaving for industry after 5 years postdoc, the other publishes like a machine, had stints at some really prestigious schools (Stanford, CMU) - but as far as I can find, still postdoc 10 years after getting his Ph.D
So while this is only N=2 sample size / anecdotal, it would seem to me that even in red hot fields like AI/ML you'd be better off finding some good company / private research group that matches your interest, and go for that. Probably going to get paid 5 times more, and not have to think about research grants and tenure track.