Let us focus on the core mechanic which caused the issue.
The fact that visitor debuff is not gained upon hearthing.
This was the factor that facilitated the raid. All we needed was
this one character in order to kill them, and raid the village.
The minehole itself is a secondary issue, which itself is just a
cheesy bit of mechanics.
Now back to the first issue, how do you handle something like this?
Even if we spawned with a visitor debuff (which we did not), then
we just had to walk outside the open gate and hearth.
This now begs to question on why that character would not get visitor.
For this, you have to consider how you would determine that a character
would get visitor when hearthing. Would you base it upon permissions given
upon the land?
In which case, what permissions? Tresspassing? Theft? Vandal?
There is really no good way to decide this, since people use varying levels of permissions
for different situations.
Had they just not left their gates opened, nor allowed random spawning, they would have been fine.
Hell, building a fence around it would have prevented us from walking in and seeing the secret.
This is not a bug. We did not try to actively glitch out a mechanic. The mechanic was just used in an
unattended way. It can hardly be compared to something like wall jumping.