Can removing dead wood harm the ecosystem?
In a word yes. Dead wood forms an important base to any wooded ecosystem. If you think of a food pyramid for a wooded area it'll look something like this:

Source
Dead wood in this process plays an important role as:
- Food for a lot of primary consumers
- Food for decomposers
- Habitat and shelter for primary, secondary and tertiary consumers (even some apex predators will use dead wood depending on where you are, e.g. weasel, etc.).
- Recycling of material for producers (compost, mulch, etc.); possibly via a decomposer
The decomposers provide an important role in recycling energy back into the system.
If you remove this dead wood you remove some primary source of food for a low level of the pyramid and also some habitat for others. Note; the lower in the chain the removal happens the bigger the affect higher up as only 10% of the energy is transferred upwards. Without food there will be less primary consumers. Without habitat the higher levels increase competition for what resources remain and numbers decline. The nett result is less of everything and a less healthy ecosystem.
The dead wood is like the glue that holds this ecosystem together. A neat wood is an unhealthy wood. Woods should be cluttered!
Obviously the impact will depend on how much wood you plan to remove.
In the UK it's actually common for wood managers to cut wood and leave it to rot specifically to increase the amount of dead wood as it will make the habitat more healthy.
A lot of the other answers talk about Fire ecologies. These are common in areas like Australia and California where the wildlife have evolved to deal with regular (moderate) wildfires.
In these areas wood is cleared out periodically by the fires. So the pyramid has evolved without the large amounts of dead wood that are common in more temperate forests.
I'm not going to repeat these points but tl;dr: Ultimately in respects to harm to an ecosystem, the wild ecosystem should be maintained in as wild a form as possible. If this involves large amounts of dead wood then leave it. If this wood is cleared (naturally) clear it.