Building “fences around the law“
… is not a bad idea, necessarily, as long as you acknowledge that they are fences around the law, not the law itself.
Which means that crossing such a fence is not itself sinful/criminal/wrong/vicious/rights-violating (as appropriate to the nature of the law in question; the maxim originally pertains to (Jewish) religious law, but similar concepts apply to other types of laws and moral principles as well), nor even in all cases a bad idea; it merely puts the crosser in territory where additional care is required in order to ensure that their steps/actions do not violate the law itself.
There’s a bit of semantic sleight-of-hand going on here.
Speaking now solely in analytic metadiscursive terms, without any commentary regarding what is or isn’t actually a good idea:
You can build a “fence” around your “law” that is the thing you describe, a pure guideline-for-your-consideration. “If you are thinking of doing Thing X, be extra careful, because doing Thing X will cause you to skirt dangerously close to actually-bad Thing Y.” This is very likely to be harmless and net-positive in its effects. It is also likely to be very very very small-impact, so much so that it’s close to useless. Your guideline will be taken seriously by a small population of people who are constitutionally serious and careful and diligent – the sort of people who probably could navigate between Thing X and Thing Y just fine – and ignored by everyone else. People mostly aren’t that kind of careful, especially when carefulness is standing between them and a thing that they actively want to do, and they are very good at creating rationalizations for why their situation is special and the guidelines don’t apply.
That is not what the rabbis mean when they talk about a “fence around the law.”
What they mean is: we are essentially creating a new law for the purpose of protecting the old law and preventing serious violations. If you cross the fence, you are going to be punished – not because crossing the fence is inherently worthy of punishment, but because we don’t trust you to decide when it’s safe and when it’s not, so we are enforcing our rule-of-thumb. In some cases this will entail punishing someone who hasn’t actually done anything wrong (apart from flouting our rabbinic authority), but we’ve judged that this is a lesser harm than allowing people to dance around the boundaries of the real rule.
As @brazenautomaton likes to point out, correctly, in a context that’s only somewhat different: your principle is close-to-worthless, practically speaking, if you grant an exception to anyone who thinks he has a good reason to violate it. Everyone always thinks that he has a good reason.