Right, you could name the object and then add a custom property to the polyline that tells you what object it is associated with.
For polylines you could give them a type like “path”, and based on this type you can predefine a string “object” property in the Object Types Editor. Of course, you would only give the ones that are actually paths this type. You can also specify a custom color for this type so that these polyline paths are easier to recognize.
For this you should probably add some log / error message to your game so that you will notice when a certain polyline specifies an enemy name (or ID) that isn’t found, as well as when it detects multiple polylines are pointing to the same enemy.