Article stopped exactly where stuff got interesting.
This whole "protons entering bacterium and being pumped out" is exactly the ancestor of the mitochondria, that's what it does, except now the "outside" is the inside of the parent cell.
The respiratory complexes - the machines at the core of it all - are absolutely wild bits of natural engineering. Perhaps the most incredible and successful non-trivial natural objects in existence.
This is very similar to mitochondrial respiration with both using an electrochemical gradient of protons, the proton motive force, as an energy source.