The answer from @hhas01 notwithstanding who may have misunderstood your questions, the real answer is real hard vector math. You would have to comb through the paths and anchor points and write a proximity test algrorithm, which likely could reasonably optimized by limiting it to pre-selected points based on a visual selection of potentially critical areas. The question then is what you would want it to do like adjust the paths and points or invoke e.g. the curve offset function to correct these things or just select the offending points or move stuff to a dedicated layer for further manipulation. That said since none of this is trivial and doesn't really address the underlying issue of avoiding such problems in the first place you may want to consider a plug-in like ColliderScribe:
https://astutegraphics.com/plugins/colliderscribe
With it's built-in collision offset set according ly you could interactively adjust your artwork and avoid such situations.
Mylenium