Your measurements will be under reasonably high vacuum and I'd personally be really worried about contaminating the entire chamber with iodine and lead - virtually impossible to eliminate without a complete rebuild of the system. I suspect that even cooling the sample won't help much. Why risk an expensive unit with one sample?
In the litterature we can easly find xps measurements on perovskite thin films. They didn't think about this problem? The PbI2 vapor pressure it's so higher then a lot of other materials that people measure on XPS?
Perovskites are usually non-volatile systems. PbI2 easily decomposes especially with catalytic materials present (stainless steel). Other feedback would be welcomed by readers of this question. Personally I wouldn't risk the equipment.