In hindsight it was stupid to not have turned off both circuits anyway, I’m just glad I was wearing sneakers so the shortest path to ground was the junction box itself.
More recent versions of the NEC require that the breakers used for both hot legs of such circuits be linked so turning one circuit off also turns off the other.
Common neutrals on residential branch circuits have largely fallen out of favor for new construction due to requirements for GFCI or AFCI protection on most circuits.
https://en.wikipedia.org/wiki/Residual-current_device
These are usually built into the electrical outlet (or one outlet may provide the GFCI/RCD for several connected outlets). A whole-house RCD as described above would be a wonderful thing.
If the “test” button is ever unintentionally pressed, maybe from some furniture or whatever pressing against it, then your whole circuit goes down. But the breaker box shows no fault, and now you get to waste the afternoon inspecting every inch of wall space for an upset outlet.
RCD breakers really are a wonderful thing though, I had my second small fridge knocked out because I had accidentally hit the test button of the outlet near the kitchen sink that the dining room outlet was fed from - having it at the breaker makes it a whole lot less confusing and removes the searching for the protected outlet conundrum.
Related but different, AFCI breakers are now required where I'm at in bedrooms and similar spaces where you wouldn't expect appliances to be plugged in.
Male-to-male cables absolutely should not be made up.
Apparently some people make them for plugging caravans in to external power as a sort of hack.