Can shutting of power bar damage cables or modem?
Shutting off the power to such a device should not hurt it.  After all, power can be interrupted for various reasons like a power outage, a breaker popping, and the like, so devices are designed for that.

Some complicated devices may have software issues when power is suddenly interrupted, but should not suffer hardware failure.  For example, you shouldn't suddenly shut off power to a PC since that doesn't allow the OS to flush pending file changes to disk, allow device drivers to shut down their devices in a orderly fashion, etc.  The PC will physically survive, but some files may be corrupted.

Routers and modems without mass storage devices are much less likely to have software issues with suddenly interrupted power, and should not get damaged by that physically.  Cables are impossible to damage just by interrupting normal power.  To kill a cable you have to put significantly more than the rated current thru it, which interrupting power doesn't do.