I am trying to connect two meshes by replacing boundary vertices of one mesh with the vertices of the other mesh. I currently do this by circulating over the in-halfedges and letting them point to the other vertex. Since I iteratively add edges along the way I am not able to insert faces. Is there an openmesh way to replace vertices and make sure all references (in/out halfedge, face etc.) stay correct?
If I understand you correctly you would like to "sew" / "weld" a boundary between two meshes together.
As you pointed out, it's not a good solution to directly manipulate the halfedge / face / ... pointers used by OpenMesh. Instead, this should be possible by inserting temporary triangles and then doing a collapse between pairs of opposing boundary vertices (removing the temporary triangles again). This way, OpenMesh will make sure all the pointers are setup correctly.