I personally haven't had a bungee cord fail, nor has my DH, but there are plenty of people in the moto world who shun them because of just the kind of incident you describe. It can be catastrophic and I'm so glad you're okay.

Whatever you use to secure your stuff, three things have to happen: (1) it has to be a QUALITY strap, because cheap ones are much more likely to fail - if it is a bungee, check the hook to make sure it doesn't bend easily, and the strap/hook connection to make sure it's a tight knot; (2) it has to be TIGHT so that vibration doesn't cause the hooks to come unhooked or your stuff to work its way between the straps - if they're elastic, then they have to be the proper length so you reach hook points and keep them very tight; and (3) it has to CROSS your stuff enough times that the load won't shift.

When I use bungees I use at least two. At minimum an X-pattern; depending on what I'm carrying, I might use a figure-8 pattern.

I think with a U-lock, because of the weight, rounded shape, small size and density, you'd have to use so many bungie cords and/or so many wrappings to secure it, that you're better off just getting the dedicated bracket. Either that or putting it inside a pannier or backpack.