The presence of microbunching instabilities due to the compression of high-brightness electron beams at existing and future x-ray free-electron lasers (FELs) results in restrictions on the attainable lasing performance and renders beam imaging with optical transition radiation impossible. The instability can be suppressed by introducing additional energy spread, i.e., heating the electron beam, as demonstrated by the successful operation of the laser heater system at the Linac Coherent Light Source. The increased energy spread is typically tolerable for self-amplified spontaneous emission FELs but limits the effectiveness of advanced FEL schemes such as seeding. In this paper, we present a reversible electron beam heating system based on two transverse deflecting radio-frequency structures (TDSs) upstream and downstream of a magnetic bunch compressor chicane. The additional energy spread is introduced in the first TDS, which suppresses the microbunching instability, and then is eliminated in the second TDS. We show the feasibility of the microbunching gain suppression based on calculations and simulations including the effects of coherent synchrotron radiation. Acceptable electron beam and radio-frequency jitter are identified, and inherent options for diagnostics and on-line monitoring of the electron beam's longitudinal phase space are discussed.