What defines the end of a "cross-country flight" for ppl aeronautical experience purposes and for general logbook purposes?
It is not in the interests of the FAA to provide a specific definition of how long an aircraft can spend on the ground before a flight &quot;ends&quot;.
Pilots are expected to use their judgment to deal with weather, fuel planning, air traffic control, etc.  Pilots are also expected to use their judgment when deciding what should and should not be logged as a single cross country flight.
This is good for pilots. The FAA trusts us to do the right thing.
Ok, but what about my questions?

For general logbook purposes you can do anything you want. Exactly nobody cares what's in your logbook except you (and maybe the person interviewing you for a job in your future).

Private, commercial, and ATP experience require hours, not flights. Therefore you may log case 1 as one flight, two flights, or three flights, depending on which is most reasonable in your judgment as a pilot and based on the unique circumstances of the flight.  For the most part this simply means you need to decide whether you want to fill out one, two, or three lines in your logbook.

Similarly, you may log all of case 2 on one enormous line in your logbook, if for some reason the unique circumstances of the flight indicate that that's the best way to do it. (Maybe you're going to the south pole, and the month-long break is because you had mechanical trouble along the way.) Similarly, you may choose to log each leg or even each landing as a separate line in your logbook (for a total of 38 lines), if that makes more sense in your judgment.

The longer the stop, the more difficult is it to argue that it should be considered one flight.  I think it would be exceptionally difficult (though not impossible, see above) to make the case that two hours worth of flying separated by a month of not flying should be considered one flight.

As guidance, remember that your logbook is a reflection of you as a pilot.  If there's uncertainty, ask yourself &quot;How would I like to be perceived, if someone were to audit this logbook?&quot;  If there's still uncertainty, ask an instructor.  If there's still uncertainty, ask an FAA inspector.  They're there to help.