I built up a solution to solve instances orientation problem based on what I previously did here:
Thanks for giving me a serious opportunity to develop this idea. To sum up, the idea is to place family instances with the node FamilyInstance.ByFace because it gives more predictable results. To do so, I place tiny circles that creates the needed faces on the selected normals of the curve. I used a profile drawn on the XY plane of the mass family but it could be re-oriented with the Vector.Rotate node anyway. Everything seems to work fine from my side. I hope the graph is clear enough (png’s are not always readable in the forum preview so you could need to download it or open it in a new window):
Here is the result in Dynamo and in Revit (after using ImportInstance.ByGeometries):