Here is something simple I threw together a while ago. Not everything you want, but should help.
I started a more extreme version with more options back when people were posting they couldn't get TotalBoundary and SuperBoundary any longer.
I'll try to get back on it this week, in the mean time, if you could post a drawing with some before and after it would help.
I have no idea what all TotalBoundary and SuperBoundary does, it may help to explain exactly how you need to select and exactly what should be a boundary in your drawing it might might it easier.
Hopefully a better LISPer will jump in.
;;; Select objects that define outlines. Works on LINE/ARC/CIRCLE/SPLINE/LWPOLYLINE.
;;;
;;; https://www.cadtutor.net/forum/topic/99063-need-a-tool-for-creating-2d-outlines-for-complex-2d-drawings/#findComment-678789
;;;
;;; By SLW210 (a.k.a. Steve Wilson)
;;;
;;; MakeOut.lsp
(defun c:MakeOut (/ ss i ent lst pts plines regions pp)
(vl-load-com)
(if (setq ss (ssget '((0 . "LINE,ARC,CIRCLE,SPLINE,LWPOLYLINE"))))
(progn
(setq i 0)
(while (< i (sslength ss))
(setq ent (ssname ss i))
(setq i (1+ i))
)
(command "_.-boundary" ss "")
(command "_.pedit" ss "" "J" "" "Y")
(setq i 0)
(while (< i (sslength ss))
(setq ent (ssname ss i))
(if (= (cdr (assoc 0 (entget ent))) "LWPOLYLINE")
(progn
(command "_.pedit" ent "" "S" "0.01" "")
(command "_.pedit" ent "" "C" "")
)
)
(setq i (1+ i))
)
(princ "\nOutline created.")
)
(princ "\nNo valid entities selected.")
)
(princ)
)