January 2018 road trip... I sought out the Nogales border crossing to observe the procedure in person. I was treated to a southbound coal train. A large barbed gate in the middle of "the wall", blocks the rail between the United States and Mexico. The train stops, the crew steps down to confer with US Border Patrol & Customs agents... and then the gateway is opened. The train proceeds into Mexico at a sedate 5mph, past tall, railcar gamma ray scanning machinery and probes. It's all reasonably quick and straightforward. The process is identical for trains entering the US, although the inspection takes longer, ensuring that no unauthorized riders tag along.