I understand your desire. Each time I draw a phrase in Illustrator, I always set the end point at the starting point, and then drag it to create the tangent for the control points on each side.
SVG . . S T, , , , , ( ).
JavaScript, .
<path d="… Z" class="smooth-close" />
... script, smooth-close, S T . javascript , .