You do need adequate space even to work on de-energized equipment -
110.26 - Access and working space shall be provided and maintained about all electrical equipment to permit ready and save operation and maintenance of equipment.
Although this could be much less than the 3 or 4 foot deep space.
OSHA, which similar wording, provides some clarity to the (IMO) poorly worded NEC requirement. Based on OSHA, working space required regardless of whether parts are exposed or not.
1910.303(h)(3)
Work space about equipment. Sufficient space shall be provided and maintained about electric equipment to permit ready and safe operation and maintenance of such equipment. Where energized parts are exposed, the minimum clear work space may not be less than 1.98 m (6.5 ft) high (measured vertically from the floor or platform) or less than 914 mm (3.0 ft) wide (measured parallel to the equipment). The depth shall be as required in paragraph (h)(5)(i) of this section. In all cases, the work space shall be adequate to permit at least a 90-degree opening of doors or hinged panels.
1910.303(h)(5)(i)
(vi) Except as elsewhere required or permitted in this subpart, the minimum clear working space in the direction of access to live parts of electric equipment may not be less than specified in Table S-2. Distances shall be measured from the live parts, if they are exposed, or from the enclosure front or opening, if they are enclosed.
Notes to Table S-2:
1 Minimum depth of clear working space in front of electric equipment with a nominal voltage to ground above 25,000 volts may be the same as that for 25,000 volts under Conditions A, B, and C for installations built before April 16, 1981.
2 Conditions A, B, and C are as follows:
Condition A -- Exposed live parts on one side and no live or grounded parts on the other side of the working space, or exposed live parts on both sides effectively guarded by suitable wood or other insulating material. Insulated wire or insulated busbars operating at not over 300 volts are not considered live parts.
Condition B -- Exposed live parts on one side and grounded parts on the other side. Concrete, brick, and tile walls are considered as grounded surfaces.
Condition C -- Exposed live parts on both sides of the work space (not guarded as provided in Condition A) with the operator between.
3 Working space is not required in back of equipment such as dead-front switchboards or control assemblies that has no renewable or adjustable parts (such as fuses or switches) on the back and where all connections are accessible from locations other than the back. Where rear access is required to work on the deenergized parts on the back of enclosed equipment, a minimum working space 762 mm (30 in.) horizontally shall be provided.