Answer:
at the moment no, machines do not prove to be threat, they are helpful. In the future, things might change, but as of now, no
Immigration would be the best option
The Tang Dynasty of China when faced with rebellion from General An Lushan in their northern territories sought outside support from mercenary forces. This was done a number of times during the rebellion, these mercenaries were typically Arab, however, we also have examples of soldiers brought from Uighur to fight with the Tang and numbered in the thousands in the fight against Lushan's forces.
With the help of mercenary forces, the Tang were able to take back several important capital cities of China and effectively eliminated the rebellion of Lushan, as well as his later supporters and successors.