You will finish by being relieved to get shot of the bloody thing, desperate to move on and work on something interesting for a change.
If you love the field enough to cope with that, and still to want to dive in and work on the same sort of thing for 3, 5, or even 8 years, then go for it. Otherwise think very hard.
Why would you do this?
Will the PhD be of net positive value? In some fields, to have a PhD is of net negative value (although perhaps only initially) because potential employers will believe you have only book-learning experience, and are of no practical use.
Do you want to do a PhD? Why? It's hard work, extremely frustrating, and usually somewhat marginal. If you work on truly mainstream material there is always a chance someone will publish before you and potentially prevent you from getting the PhD.
So if you really want to do it, then go for it, but start by understanding your reasons and motivations. Certainly ML is a rich field, full of as-yet-undiscovered techniques and algorithms, and undoubtedly useful. But remember, a PhD is not the only way to get into a field - another path might be better. Don't be excessively tempted for the initially easy option.