Depends. Especially if your main idea is that it will help in the immigration process. Certain countries---such as Australia, Canada, and New Zealand---have a fairly transparent immigration process---a "points" system"--for "skilled migrants". You can look at the relevant webpages to see how many points you would get if you applied now and what the current "pass mark" is. Depending on the country, you may get a few more, but not many, points if you have a PhD. At any rate, you could find that you already "qualify".
On the other hand, in all these "points systems" you also lose points for getting older; so you should consider that and the cut-off-dates/points for different age-groups before putting in the time to get a PhD.
Another things is that a place like Canada has a system in which application-time to decision-time can be quite long and depends on where you make the application---different times for London, Nairobi, Bogota, etc. (The times should be available on some website.) You could well be done with your studies in the interval. For the other side, Australia will speed things up if you are willing to initially live in one of the "less desirable" states: look for a "regional visa".
If your engineering area is in demand in some place, then you might consider the much faster process of applying for a job and work permit/visa, with permanent residence to be done later.