DIY caves are probably a lot safer.
On Earth, the rule of thumb about caves and tunnels is “What Mother Earth didn’t create, she tries to destroy.” So things are just opposite: natural caves are safer than man made tunnels.
However, Mars doesn’t have as hostile an environment, so caves that would have long ago collapsed on Earth, because they were unstable, still exist on Mars. At least until they are disturbed.
This is why I suggest sending mining robot advance teams to both the Moon and Mars, to create new, safe, stable, horizontal shaft tunnels for habitats. The robots could be mining for a year or two before people even show up.
It would save enormous amounts of money, be much larger and better habitats for people to live and work in, and might even have storage for large amounts of water or ice, in cisterns.
This would mean longer missions, with much more equipment and supplies brought with, and amenities like fresh vegetable gardens.
The moon is a harsh mistress.