The "Military Restricted" flag should do what you want as it basically tells all civilian ships to avoid that body. When you establish a new dig site colony, in the Economics window / Civilian Economy tab there is a checkbox along the top row for "Military Restricted Colony" that per this comment from Steve should cause civilian ships to avoid the body. If that isn't working it is probably a bug and should be reported.
N. B. you can rename a colony/population separately from the body it is on, so you could establish a colony on Mars for instance and call it "Mars Dig Site" to keep track of what it's for.
Yeah, presuming you remember to do it before a ground force with construction units find something that causes the arch dig to become a settlement or viable for one, as mentioned before.
Case in point, see attached. I've not added anything to Mars or Venus in my current game as far as buildings are concerned, and Venus had a 6 building ruined site that's been cleared. Both became auto-mines because the construction team found automines. Mars could actually get a civilian colony ship show up if I hadn't already set it to military only, like Venus did in my last game, as they've already found infrastructure there.
I'm not arguing that what's there can't do the job, I'm requesting the ability to allow players to pick on colonise (and manually change after) and have templates to set things up automatically rather than rely on the AI recognition and have to remember to go into a tab you're likely not going to use unless you're establishing the colony for population to tell civilian ships that they're not allowed there just in case the AI decides that 'hey, this ruin has automines, it's an automine now' or 'hey, there's infrastructure here, send in the colonists'.
Honestly speaking, what tabs are ones you look at for a colony in general? Main economy tab and mining are probably the two I care about for most colonies, the others are pretty much only if there's a population, which if I'm not planning a population but find a ruin, could (and did) result in a populated colony where I don't want one right then, or a place being tagged wrong from the AI.
Hell, having templates for colony types could help with automation, because you can set as an example from my current game an automine colony template as needing 100 automines and 5 mass drivers delivered and have a cargo fleet set to automatically do those orders as a standing order. You tell the game you want to colonise some asteroid, tell it that the rock is an automine and if there's available automines/mass drivers the fleet with standing orders will deliver, or it could even set a construction queue to the nearest populated colony and have those buildings reserved.