"Two temperatures" are by no means "necessary". Isothermal (one-temperature) heat engines are commonplace - e.g. pH-sensitive polymers can do work, at the expense of ambient heat, as they swell or contract. No "two temperatures" involved:
Adding and removing H+, per se, consumes no work if done QUASISTATICALLY. This means that the work lost e.g. in adding is compensated by the work gained in removing, and the net work involved is zero. So lifting weights is the net work in the whole process. The second law of thermodynamics is clearly violated.