"Seal the borders and enforce our immigration laws before opening up a rail line which could make smuggling all that much easier."
With jobs at the new port, why would they come to the US?
A pre-inspection of the rail cars upon leaving the Mexican port will do no good as anyone and anything will likely be able to hitch a ride before it crosses into the US. The entire train will have to (should be made to) pass through a special zone where every container and car can have dogs sniff it over for people and/or drugs. With that in mind, will it be economical? Probably not. Without it, will it be safe? Probably not.