The oh-so-clever trick is to transfer heat elsewhere while you're compressing the gas, so you actually reduce back-loading on the piston instead of having it 'fight' the temperature rise. This can be accomplished via water spray, or by compressing a gas bubble that's surrounded by water (eg in the trompe).
By continuously removing heat as you compress the gas, it effectively acts like a train of compressors and intercoolers with an infinite number of stages, ie true isothermal compression. No magic, just physics.