I'm working on such a plugin at the moment, and hopefully I'll release it in the next days, gazebo_video_monitor_plugins. Perhaps, it can fit your use case.
But, more specifically on your question...
As a side note, you don't need a new link. It should be enough to just specify a pose inside the camera description, and attach the camera to an existing link. Although, I'm not entirely sure that this is working properly with the camera sensor. But, that's the idea anyway.
The way to create a sensor is by triggering the createSensor event, where you provide the sensor description, the name of the world is which to create the sensor, and the name and id of the link to which to attach the sensor.
#include <gazebo/common/Events.hh>
#include <gazebo/sensors/SensorFactory.hh>
event::Events::createSensor(sdf->GetElement("sensor"), world->Name(),
link->GetScopedName(), link->GetId());
This will be picked up by the sensor manager, which it will take care of the rest.