Since I don't use public mines anymore, I can share few secrets with y'all:
1. Use veins placed near edge of map (in NCR it is North-eastern one).
2. Use only this one vein. Dont run around the place.
3. Place your Brahmin near the edge of map.
4. If some shady character comes too close, ctrl + left click and command your Brahmin to run away. It will disappear immiediately. The Brahmin will get back to you on World Map.
It's still a risk, but it should do.
The best option is:
1. Build mining char. 10 strength, 2 support perkis gives you 216 carry weight (432 with overweight). Its good to have a lot of endurance to withstand some hits.
2. Build safehouse right next to mine