Could we even get spare components for the electrical grid in the event of a widespread failure? Most of them are most likely manufactured overseas.
Not quickly.
The very big ones, there are very few spares lying around, and it would take months to get replacements manufactured and delivered in best of times. How are you going to off-load a replacement truck-sized transformer from Taiwan or South Korea into the Port of Long Beach and move it if there is no electrical infrastructure in Los Angeles and hasn’t been in weeks?
The smaller ones, there are more spares lying around, and low levels of service could be restored in many areas using them. However, if the attack occured in winter, they would not be able to distribute enough power to support all the buildings that are heated using electric-resistance heat.