What if you push the button really slowly, so that it's a thermodynamically an adiabatic process? As you release the button equally slowly, it does an equal amount of work on you. The process has been thermodynamically reversed, so all is cool! (The irreversible state change in the button-driven machine, arguably, increased entropy, though, ouch. Maybe not!)