While I'll agree watering is important, and cycling the wet/dry, I don't feel like tha's your main problem here, I think heat is...
Back to the primary issue at hand. If your running 38-40c , you need to find some relief for the plant somehow, if possible. Go a bit lighter on the nutes during these high intensity periods, then ramp it up again when it's cooler. Either find a cooler spot, or give it a bit of shade during the worst spells.
Autoflowers are simply going to be a challenge in very hot climates. There not genetically inclined to do well in high heat situations.