The answer to 'lifespan of junction box' is that a properly installed and maintained junction box can last for decades. Junction boxes are designed to be durable and withstand the elements, and with proper care, they can continue to function safely for many years.
Most junction boxes are made of metal or high-impact plastic, which are highly resistant to damage and weathering. As long as the box is not exposed to excessive moisture, physical damage, or corrosive chemicals, it can continue to provide a safe and reliable connection point for electrical wiring in your home. With regular inspection and maintenance, such as ensuring the box is securely mounted, the cover is in good condition, and the wiring connections are tight, a junction box can easily last 20-30 years or more.