That's still done today, evidently! A few months back, there was a small gas leak in my neighborhood. When they knocked on my door to say they'd be working in the area, the repair crew leader was kind enough to indulge my questions.
I asked them if my gas would be shut off. They said no, they do the work while the gas is still on!
And they must have been cutting into the gas line because they replaced a section that ran under the street. They used a backhoe to dig huge holes on both sides of the street and then fed a flexible pipe through.
Here's a video about something kind of similar: https://www.youtube.com/watch?v=UCMs__ZnOfA
I'm sure today's techniques are different and much safer, so I don't think it negates your point that they used to do risky stuff.