There is no official ruling on whether the answer is yes or no. The old Part 61 FAQs said that the safety pilot could not log the time as X/C since the regs require a landing which only the pilot flying would get. Your solution gets around that objection, in my view.
If that particular FAQ answer still represents policy, I disagree that a touch & go by the safety pilot at the destination gets around it. Three reasons:
1. The FAQ referred to "
the takeoff and landing, i.e., conducting flight in an appropriate aircraft per the definition of cross-country." That's a reference to the takeoff and landing at the beginning and the end of the flight that makes it a cross country to begin with. If you really want to play this game (but see #3), do a touch & go and both the departure and arrival airports.
2. Part of Lynch's objection was to the part-time nature of the safety pilot. "The person that acts as safety pilot is no more than a passenger during the VFR portions of the flight. There is no logic, common sense or regulatory provision for a passenger, even a part time safety pilot, to log cross-country flight time." (Yeah, this really doesn't make too much sense, but see #3.)
3. Ultimately, IMO, this FAQ was a goal-oriented policy decision, not a true regulatory interpretation. The goal was simply that safety pilot time not be counted toward meeting cross country requirements for certificates and ratings. You make the interpretation fit the goal you want, whether grounded in "logic, common sense or regulatory provision" or not. "Getting around" a result-oriented policy usually doesn't work out too well.