Reversible gas–solid reaction in an electronically-stimulated palladium nanogap