In this paper, a combined three-dimensional (3D) optical-electrical simulation of non-pb and flexible four-terminal (4T) all perovskite tandem solar cell (APTSC) is presented. In this structure, polyethylene terephthalate (PET) is used as substrates, while the top sub cell has a MAGeI3 absorber layer and the bottom sub cell has a MASnI3 absorber layer. This structure is used as a reference in this paper and the optical and electrical properties of it are investigated using the finite element method (FEM). It is shown that this structure has a total power conversion efficiency (PCE) of 24.65% . Then, the elimination of the buffer layer and the addition of antireflection layer (ARL) strategies, as well as the use of periodic nano-texture patterns, are used to increase the reference structure’s total PCE. A free-buffer layer tandem device is presented to minimize the parasitic absorption. While the total PCE is improved by 1.14% in this case, one of the fabrication steps is also eliminated. A plasma-polymerfluorocarbon (PPFC) coating layer is suggested as ARL on the substrates of both sub cells to reduce reflection loss. With optimized these layers thickness, total PCE is increased by 12.76% . Because the PPFC layer is hydrophobic, the top surface of two sub cells in this structure has self-cleaning characteristic. As a result, this device offers long-term moisture resistance. Finally, the best structure in terms of the maximum total PCE is presented by increasing optical path-length utilizing nanophotonic and nano-plasmonic structures. The final structure is offered as a 4T tandem solar cell (TSC) that is environmentally friendly, extremely flexible, and has self-cleaning capability, with a total PCE of 30.14% , which is greater than the total PCE of the reference structure by 22.27%.