There is a tool called a ‘nut breaker’ that gets me out of trouble once in a while. It has a knife edge that is threaded on one end, and you use a socket wrench to push the sharp edge into the side of the nut, breaking the nut in half. Other options include using a cutting torch or a hacksaw to destroy the nut. With some nuts you can weld something on that gives you more of a grip, and occasionally vice grip pliers will offer enough torque to get a rounded nut off. All of the above are destructive methods that get the job done, with more work to do when you put the new parts back together. Once in a while either penetrating oil or heat will offer enough to get the nut off without destroying anything. But if you nut is truly rounded you will want to replace it (and probably the associated brake line or bolt) anyway.
Best way to prevent having to remove a stripped out fastener is to not strip it out in the first place. Use high quality sockets and wrenches like Snap-On flank drive to reduce the chance of rounding off edges.
Line wrenches are great but not all are equal. Different brands use different materials. Some materials will feel springy and will have a tendency to stretch open and cause rounding. I prefer a less springy and more ‘brittle’ material – my favorite line wrenches are made by Hazet.
One trick that i use for extra traction on stubborn fasteners is to apply a couple drops of thread locker or valve grinding compound between the wrench and fastener. This helps the wrench grip the surface and reduces slipping. It works like sand under your tires in winter.
Try the blue wrench. That is a blow torch followed by a dousing in penetrating oil. The quenching effect helps to mechanically break the threads apart. This works great for brake lines. Heat alone helps free up the stuck brake line collar, and it helps the penetrating oil seep into the threads. This may make the difference between removing the fastener with ease or rounding it off further.
If you feel a wrench rounding a fastener, just stop and regroup.
For areas where you can only use a wrench, try a vise grip. Get a good bite on the fastener. Slipping will just dull the teeth on your vise grip and ruin the fastener further.
For fasteners where you would use a socket, you can get some twist sockets that hammer onto the head of the fastener and bite harder as you loosen. There is also a version for inside-drive fasteners like torx and allen.