The correct foam is very cheaply available, its actually a closed cell rubber foam. And you should have not used WD40 in those places. WD40 is a cleaner and it flashes off easily, leaving a residue that will eat away those little plastic bushings.
A drop of regular cheap SC grade engine oil works or genuine singer sewing machine oil. A very good practice in damp and cold areas is to remove the door lock mechanism, clean out all the old grease and apply fresh grease to it along with a drop or two of oil and working it so all grease gets distributed, keeps it from wearing out.
In extreme cold areas some experienced guys take some antifreeze coolant mixed with distilled water and squirt it on the door handle hinges after a few drops of oil - they dont stick.
KUDOS to you that your door inner plastic moisture barrier sheet is still in place.