The answer to 'when to replace outlet' is that you should replace electrical outlets when they become worn, damaged, or no longer function properly. Outlets can wear out over time due to regular use, and old or faulty outlets can pose fire and electrical shock hazards.
Some common signs it's time to replace an outlet include: the outlet feels loose when a plug is inserted, the outlet sparks or makes a buzzing sound, the outlet only works intermittently, or the outlet is cracked or damaged. It's generally recommended to replace outlets every 10-15 years as a preventative measure, even if they seem to be working fine.