In perovskite solar cells (PSCs), expensive gold or silver metal has traditionally been utilized as the rear electrode for highly efficient performance. In this context, carbon nanotube (CNT) electrodes have been considered promising rear electrodes because of their excellent electrical conductivity, mechanical strength, and chemical stability in PSCs. Despite these favorable characteristics, concerns have been raised about the power conversion efficiency (PCE) and stability of PSCs based on CNTs due to the porosity of CNT electrodes. In this study, we employed both poly(triarylamine) (PTAA) infiltration and rear electrode hidden encapsulation approaches to address issues related to the porosity of thin-walled carbon nanotube (TWCNT) electrodes to achieve high efficiency and stability. The infiltration of low-molecular-weight PTAA into the TWCNT electrode reduced electrode porosity while simultaneously improving the interfacial contact of the TWCNT layer with the perovskite layer. Furthermore, a novel encapsulation design was employed to prevent air and water exposure of the TWCNT electrode, which significantly enhanced device stability. PSCs with TWCNT rear electrodes developed on the basis of these strategies have the best PCE of 19.5% and show long-term stability, retaining 96% and 74% of the initial PCE after 225 h at maximum power point tracking under AM 1.5G illumination and 916 h at 85°C/85% relative humidity, respectively.