It sounds too specific what you're asking (it's not necessarily a bad thing).
Even in 3DS Max, a commercial software with powerful modelling tools, there's only axis-aligned planar alignment of vertices (that is, it's limited to the XY, YZ and XZ planes); It's not arbitrary like what you want, and not in a vector\3D line, and not with regard to the order in which the vertices were selected.
But you defined all the steps for what you want and that's an interesting point - it shows you understand the logic behind it, and you even presented ideas for options for toggling (the X,Y and Z constraints you mentioned). It doesn't sound over complicated either.
It'd be mapping each vertex position to the 3D line formed by vertices V and V[n] in a selection of 'n' vertices, and you would do this based on the closest distance from each vertex to this 3D line.
You see, Blender has an API bound with Python, so you can build your own modelling tools by coding Python scripts. You can find educational material both on Python and on making scripted tools for Blender, so it'd be a great idea if you could dedicate some time to study this.
If you learn to code Python tools for Blender then you can pretty much add most "simple" features like these yourself. I myself am very tempted to do this too.