This is a very good point. That is, paint will tend to flow a little off of high points or body lines and as such paint can be thinner in these areas and that's why you don't want to sand too close to them.
I use my thumbnail as a measuring tool, which is about a 1/2 inch in length, as a simple guide as to how close to sand to the edge.
A good rule of thumb, (no pun intended), is to never sand where you cannot safely use a rotary buffer. It's easy to sand close to an edge and not actually sand on the edge, it's difficult however to buff close to an edge without accidentally buffing on the edge.
The most common question that comes up on this topic of not sanding or buffing close to edges or body lines is
If I don't sand and buff all the way to the edge, won't there still be orange peel left in the paint in these areas?
The answer is yes, at least a little. How much time you want to invest into sanding and buffing close to edges and body lines is up to you but it's hard to get paid for that kind of meticulous work.
Two ways to remove orange peel close to body lines and edges is to use painter's tape to tape off the edges or body lines and then sand and buff up to the tape line, or sand up to the tape line and use a compound by hand to remove the majority of sanding marks, (because you can exert a lot of pressure using a few fingers to work a compound to a small area), and then do some careful machine polishing to remove any fingermarks from the hand rubbing process. Both of these techniques are time intensive and usually a little nerve wracking.