On my half-hour-each-way commute, I carry a spare tube and a pump on my bike, and a Leatherman and a Swiss Army Knife on my person. I can do a field repair of a flat tire in about a half-hour, but the past couple of times it’s happened, a co-worker has seen me and given me a lift anyway. Just as well-- I’d want to re-do the repair at home, anyway, because I can do a better job of finding (and hence removing) the puncturing object at home.
I don’t carry spare cables. Those only very, very rarely break, and even if one does, you can limp home with a broken one (either go slow and use the other brake if it’s a brake cable, or just go in the wrong gear if it’s a shifter cable).
My bike is completely non-electric, but even if it were, I still wouldn’t carry a spare battery. I’d just fall back on the pedals if need be.
I maybe should carry some zip ties, some duct tape, and an appropriate-sized single Allen wrench (all of the hex bolts on the bike are the same size). I’m not sure precisely what I’d use any of those for on the road, but they’re all small, light, and generally useful. Both of my wheels are quick-release, so I don’t need any tools for that.
I used to patch flat tires, but I mostly don’t bother with that any more. A patch kit costs nearly as much as a new tube, and I’ve had a patch fail more than once.