Ok. Here it is. No script required.

The pentagram.

Select the edges you want to connect and subdivide multi>>2 cuts

Select the two new vertices on one of the edges, and scale them until one of the vertices is on the intersection. (Zoom in and Shift Scale for extra accuracy)

Do the same with the other edge

Merge. The two edges are now connected with a vertex at the intersection.

The key is to have two vertices on the edge, that way scale will move them both along the edge without disturbing either end point or moving the edge. You’ll wind up with a few extra vertices, but you can delete them and rebuild the edge between the end points and the intersections.

[Oops! Is that pentagram UPSIDE DOWN!!! OMG!!! The devil made me do it ]