That is why when I am asked I always include the caveat that the introduction to the collar (whether with invisible fence or remote training) be done carefully and correctly.
It might interest you to know that I tried unsuccessfully to use invisible fence with Perry at the farm before I started using an e-collar, and I was unsuccessful because I was not comfortable with the level of correction…....way too high IMO for a sensitive dog! I have no doubt, given my subsequent experience using the remote collar with him, that he would have been one of those dogs who respected the fence, and the failure was entirely mine because I was reluctant to subject him to a high level correction when he didn't understand "why". With the e-collar, I made sure he understood the collar at a very low level (irritating but certainly not painful), and that he knew that the "consequences" were entirely under his control. I think I would be happier with an invisible fence that varied the level of correction in relation to distance from the fence, but that's another topic.
I also would not advocate invisible fence for small dogs where the likelihood of trespass by a larger dog is high, since they are then at risk of being attacked "at home". I think the best use of the fence is as backup to a physical fence, to deter climbing or digging out.
My views on remote collars for training are also a bit ambiguous, but I do love it for the ability to enforce an already familiar command at a distance. That is how I use mine, and I make no apology for a fleeting application of pain if it keeps my dog safe and under control. It's a trade off I can live with for the freedom I am able to grant him, and he seems to agree with me.