At least 40,000 homes and businesses are without power across Perth after overnight rain sparked dozens of pole-top fires.