On Stack Overflow, your reputation is an indicator of your contributions to the site. Since the question has been deleted, it is no longer part of the body of content on the site; therefore, you are not awarded reputation for having contributed to it.
In general, you should avoid editing questions that are ultimately unsalvageable and will eventually be deleted. This is known colloquially as "turd-polishing," a vulgar euphemism suggesting that you are pursuing a futile attempt to make something better that cannot possibly be made useful.
Of course, it is possible that you misjudge and edit something that the community nevertheless deems unsalvageable. Maybe you thought you could fix it, but really couldn't. Therefore, you are not punished for having made these edits. But you are not rewarded. Think of it as an incentive to spend your time more constructively.