AutoCAD BPOLY command
Instead of using commands such as Copy, Trim, Pedit with Join to create a closed polyline around multiple entities try using the BPOLY command.
The BPOLY command will open the Boundary Creation Dialog box.
To create a closed polyline around the outside of the objects simply create a rectangle polyline enclosing the objects before running the BPOLY command. This will ensure you can use the Island detection option. Make your pick point between the rectangle polyline and the objects.
Finally delete the polyline rectangle once the closed polyline has been created.
Objects that formed multiple closed spaces. The idea behind using the rectangle is to shrinkwrap the largest combined closed space that the objects made.