This is one of the biggest problem with power strips (surge protectors)...
Overload!
The average person does not think about how much power each device is drawing, or how much the system can handle, they just see an open outlet and plug stuff in. If they can't find an open outlet... Oh yeah! they make adapters for that! I mean they sell the adapters, so they must be safe... Right?
If your power strips look like this (or worse), you better at least be checking the batteries in that smoke alarm (which is hopefully not plugged into this power strip too).
If you are using the power strip (or extension cord) properly (one plug per outlet, no adapters, no daisy chaining) and you inspect the power strip for damage (wear & tear) regularly, you should not have much to fear.
Another thing to look at when using a power strip or extension cord, is the size of the wire and the voltage and amperage ratings. If you are using things like electric heaters, power tools, vacuums, etc., make sure the wire (extension cord/power strip) is the proper size to handle the above average load of these types of devices. Overloaded wire can heat up quickly and cause a fire.
Basically if you use common sense, inspect the cables for obvious damage and/or wear & tear regularly, and use the cables for their intended purpose, you should have no problems using extension cords and/or power strips.
Here is some interesting stuff from The Office of Compliance about
Power Strips and Dangerous Daisy Chains.
Problems:
OSHA regulations require that conductors and electrical equipment
be used in accordance with the conditions under which they are
approved by a recognized testing organization (29 CFR 1910.303(a)).
Most power strips are approved for providing power to a maximum of four or
six individual items; however, when multiple power strips are
interconnected, the one directly connected to the building outlet
is often supplying power to far more than the approved
number. This electrical current overload can result in a fire or can
cause a circuit breaker to trip, deenergizing computers and other
equipment throughout the area. The risk is magnified when another
outlet in the same wall or floor receptacle is also overloaded in a
similar fashion. When other outlets on the same circuit are also
overloaded, the risk increases.
Extension cords are sometimes used to
energize power strips in locations far
from outlets. Because electrical resistance
increases with increased power cord length,
interconnecting cords increases the total
resistance and resultant heat generation.
This creates an additional risk of equipment
failure and fire, particularly when paper and
other combustible materials are in contact
with the wires. Additionally, OSHA’s
regulations allow extension cords to be used
only as temporary wiring for up to 90 days.
Unfortunately,once in place, extension cords
tend to become permanent wiring and a fire
hazard.
Solutions:
Several safe solutions exist. In many cases, a
power strip energized by an extension cord or
another power strip can simply be replaced by
a power strip with a power cord of adequate
length to reach an outlet. Other
times, use of a power strip that is better able
to accommodate bulkier transformer plugs
solves the problem.
Several factors should be considered when
selecting an appropriate surge protector. Since
models vary in the amount of current that
they are rated to safely carry, it is important
to consider the amperage requirements of
the devices to be energized. Models vary in
length of power cord, typically ranging from
three to 15 feet. Choose one whose length is
most appropriate for reaching the intended
room outlet. Avoid having too much excess
cord, and make sure the surge protector is set
on its base. Some have swivel plugs which
makes them easier to connect to the outlet,
and helps to protect the plug and cord from
damage. Check each surge protector to
make sure it is in good condition for use.
Only power strips equipped with internal fuses are acceptable as permanent wiring. Those
lacking these fuses are equivalent to extension cords, and therefore may not be used as
permanent wiring. When a power strip is installed, care must be taken to ensure that it is
not suspended in mid-air by its power cord or cords plugged into it, resulting in excessive
stress on electrical connections.
The National Electrical Code (NEC) has a whole article devoted to flexible cords and cables, one of the more applicable sections in this case would be 400.8.
2008 National Electrical Code
ARTICLE 400 Flexible Cords and Cables
400.8 Uses Not Permitted. Unless specifically permitted in 400.7, flexible cords and cables shall not be used for the following:
(1) As a substitute for the fixed wiring of a structure
(2) Where run through holes in walls, structural ceilings, suspended ceilings, dropped ceilings, or floors
(3) Where run through doorways, windows, or similar openings
(4) Where attached to building surfaces
*Exception to (4): Flexible cord and cable shall be permitted to be attached to building surfaces in accordance with the provisions of 368.56(B)**
(5) Where concealed by walls, floors, or ceilings or located above suspended or dropped ceilings
(6) Where installed in raceways, except as otherwise permitted in this Code
(7) Where subject to physical damage
*368.56(B) Cord and Cable Assemblies. Suitable cord and cable assemblies approved for extra-hard usage or hard usage and listed bus drop cable shall be permitted as branches from busways for the connection of portable equipment or the connection of stationary equipment to facilitate their interchange in accordance with 400.7 and 400.8 and the following conditions:
(1) The cord or cable shall be attached to the building by an approved means.
(2) The length of the cord or cable from a busway plug-in device to a suitable tension take-up support device shall not exceed 1.8 m (6 ft).
(3) The cord and cable shall be installed as a vertical riser from the tension take-up support device to the equipment served.
(4) Strain relief cable grips shall be provided for the cord or cable at the busway plug-in device and equipment terminations.
400.8(1) As a substitute for the fixed wiring of a structure.
400.8(2) Where run through holes in walls, structural ceilings, suspended ceilings, dropped ceilings, or floors.
400.8(3) Where run through doorways, windows, or similar openings.
400.8(4) Where attached to building surfaces.
400.8(5) Where concealed by walls, floors, or ceilings or located above suspended or dropped ceilings.
400.8(6) Where installed in raceways, except as otherwise permitted in this Code
400.8(7) Where subject to physical damage
I suppose it's safe as long as you wire it properly, including a secure attachment between the box and the cord to prevent the cord from pulling out. It certainly is not code-compliant, but temporary wiring like an extension cord isn't covered by electrical codes I believe. Yes, I would ground the box. (Depending on which outlet you install, it may be grounded automatically with the receptacle mounting screw, but I would do it with a pigtail anyway.
But why wouldn't you just use a power strip instead? Definitely easier and safer, probably similar in price to buying the parts individually.
Best Answer
Replacement cord ends are not illegal for home use in the USA. They are, however, disallowed by some jobsite governing organizations (OSHA, for example) in certain situations.
Just make sure you're familiar with the fundamentals of electricity and know how to make good electrical and mechanical connections. (The cable jacket should usually extend into the plug and be retained by its clamp.)