If Texas wants to merge with Mexico..., then they can stay the current course. They will not need to succeed since the Feds have ordered a stand down at the border. They are already well on their way to merging with Mexico.
However, if they were to succeed, then I would imagine one of their first orders of business would be to sweep out all the illegals.
I believe that there are already enough "legal" recent immigrants in Texas that, given the differences in birthrate, it is only a matter of time before they become the majority. Also, an independent Texas would be an incredible magnet to Mexican nationals precisely because of the possibility of righting what many Mexicans consider a great wrong in their history. An independent Texas would almost inevitably become the 32nd Mexican state.