An example for planet and space-location (from within this mod's Metal and Stars compat code); this runs during data-updates, and prevents new connections from being drawn to these locations on the starmap:
data.raw["planet"]["ringworld"].redrawn_connections_exclude = true
data.raw["space-location"]["calidus-senestella-gate-calidus"].redrawn_connections_exclude = true
This is assuming these subterranean surfaces cannot be marked as hidden? Presumably, there should be a way to get to these surfaces from the planet itself, and probably shouldn't appear on the starmap to begin with? Since you likely won't be getting to them from the starmap
For example, the Maraxsis trench is a coded as a "planet" but is a distinct surface, separate from the main Maraxsis planet, and is entered by walking to certain points on the planet, and 'descending' into the trench, using some runtime scripting. The trench does not appear on the starmap, because it is marked as hidden; this also means it is ignored by Redrawn Space Connections.
EDIT:
Is it possible to include a setting to list excluded surfaces?
It should be theoretically possible to do this... but I don't know if I want to expose that functionality directly.
If something is a global issue, I would rather people report those here, so I can fix those issues for everyone. The only reason I didn't act on this one, is because I assumed the original dev would have done something about it. Until today, neither the OP nor the original dev got back to me, so I assumed it was either fixed or no longer an issue.
It also isn't too difficult to create a local patch mod that fixes it directly, without my intervention. Just copy a simple mod template and add a couple lines to data-updates, similar to the above, with the names tweaked. That's exactly how this mod came to be; I didn't like some of the connections being made by Redrawn Space Connections that seemed unintentional, so I wrote up a couple lines of code to fix it. Then I added support for a few more mods, and then a few more, until it became this