The Cosmic Thermal History Probed by Sunyaev–Zeldovich Effect Tomography