I'm not aware of a simple way to replace edges automatically. The direct approach to this seems to be to loop over the edges and to generate the geometry manually.
With the add-on Animation Nodes I was able to create a setup that replaces all edges of an object with some template profile. Selectively replacing edges based on some condition determined by the coordinates (e.g. replace all edges which are longer than…) is also doable. I was not able to figure out selectively replacing them by criteria like whether the edge is selected or if the edge is marked as seam or sharp.
The new profile could either be oriented along some global axis or an axis dependent on the two vertices' normals. It's also possible to use conditions like “point the profile towards global Z, but point it along the normals if the edge points in Z direction.”
Generating the new edges works fine and this process will also generate any faces that may appear in the template profile. But reusing some faces of the original mesh (without using all of the old vertices and edges of it as well) is more problematic. AN only exposes edges and polygons by index and I assume simply deleting edge indices will lead to errors.
Here is the node setup that I used…
…and the blend file as I guess nobody wants to copy the wiring: