Preventing rust becore paint

When I had the floor out of my car recently I wanted to get the inner rockers wire wheeled down and get some rust areas cut out and new metal butt welded in etc. Bare metal kept flash rusting. So I sprayed WD40 on it and that solved the problem. Then after all the metal repairs and prep were done I sprayed a couple cans of Brake Parts Cleaner to rinse all the WD40 off. Then I sprayed Epoxy Primer to get everything protected before new floor was put in. That approach worked well for me.