Car lost all electrical while driving

Sounds like a bad ground to me. Many dont realize battery terminals are different sizes. What seems tight may just be tight to itself, but not really snug on the terminal.
Check block, firewall, radiator support grounds. There was a guy on here the other day that lost all lights bc of the small wire ground on the radiator support... I myself had the "tight battery clamp, loose on terminal" I described above when I was young. Sounds same as yours. Car would completely go dead, and magically come back alive.