WASHINGTON — Four years ago, Elon Musk, the brash, outspoken Silicon Valley entrepreneur, strolled into South Texas for the groundbreaking of a site for SpaceX, his private rocket company.

Joining Mr. Musk were Representative Filemon Vela, Democrat of Texas, and Rick Perry, who was governor of Texas at the time and is now President Trump’s energy secretary.

On that windy September day, the trio smiled and dug shovels into a mound of dirt in front of a large sign: “Future home of SpaceX’s South Texas launchpad.”

The rural tract of land that was supposed to be home to a commercial spaceport now stands in the path of Mr. Trump’s border wall. Mr. Musk is just one of the potentially hundreds of private landowners in Texas who would be disrupted by the president’s desire to build a “big, beautiful” wall.