The US–Mexico border is so long and varied, danger is going to vary significantly. I cycled the Baja Divide cycling route, which starts from San Diego and goes through the nearby Otay Mountain wilderness reserve before reaching the Mexican border. The trails around Otay are littered with backpacks dropped by migrants, and when I asked a CBP officer parked in his car monitoring the area, he said that patrols were only partly successful and aliens were constantly getting through. It’s just a few km of walking before a migrant will hit a paved road where a prearranged contact can pick him up. Compared to descriptions of crossing the desert farther east, this seemed pretty safe, with the main risk the waste of days and months if one is caught by Mexican or US authorities.
There’s a good video in which a YouTube creator gets a tour around the US-Mexico border with an Arizona sheriff and discusses these kinds of issues: https://youtu.be/GdYAYgbf5Uc?si=RD8b8NTfxsyv0urz
There’s also a Texas sheriff video, but the Arizona video is more interesting IMO because the sheriff knows more about how immigration law impacts border enforcement.