So it turns out that the #javascript command 'new set' will de-duplicate an array. So I simply had to pass in the #ACARS flight plan waypoint list into that and get out the other end a very clean #SkyVector URL.
Attached is a very long civil flight plan as an example.