The default join is indeed a bit over aggressive for this kind of import use as it does not have any merge distance option.
This is possible to script or program with the plugin api. Its a bit tedious as illustrator scripting API is very low level when it comes to Bézier data. However, there is more to consider than just joining such as how to handle forks in the path and overlapping data.

Image 1: How do you handle joins so that offsets match.
So there are many implementation details to consider beyond just merging close points and ignoring the forked neighboring paths.
I am currently a but short on time so I can not script this for you, even tough I've needed this same thing occasionally when dealing with CAD/GIS/3D Render Files. It should not be impossibly hard for a developer to actually do this, but i am not aware of anybody who has done this implementation in way that would work out for you. This is on my list of things to do however but I'm a bit skeptical whether I will ever have time to go that far down the list unless this becomes a weekly issue for me personally. I would say that it is a 1-2 workdays task to program this.
However, there might be a shortcut for doing this. It is possible to circumvent the problem if your data consists of short spans. The extra joining lines tend to be much longer than your initial data segments. So you could instead join with the builtin join tool, then select spans that are longer than a certain value and delete them. This would be much faster to implement as you wouldn't need to build acceleration structures direction checking etc etc.

Image 2: Alternative, even if somewhat inferior method.
Though obviously this is inferior as it can get errors in the result as some join spans can certainly be short. However this trick only works if your data is made out of smaller segments so not a suitable solution for all cases. Asw you did not answer my comment i can not know if this helps you or not so I wont invest time in scripting it.

Image 3: Result of trick and dashes.