I've not tried this yet but i wondered if you could connect the PIR output to the ESP CH_PD so when the PIR is triggered it sets CH_PD high so the ESP starts up and then have the ESP set a spare GPIO high and have that also connected to CH_PD so the ESP stays running after the PIR resets, and then when the ESP has done its stuff set the GPIO low and so the ESP powers down.
I've not tried this yet but i wondered if you could connect the PIR output to the ESP CH_PD so when the PIR is triggered it sets CH_PD high so the ESP starts up and then have the ESP set a spare GPIO high and have that also connected to CH_PD so the ESP stays running after the PIR resets, and then when the ESP has done its stuff set the GPIO low and so the ESP powers down.