Preflop
You can open A7s from any seat, but when someone already entered the pot from UTG, and with a huge 4BB raise as well, this is just an easy fold. I would not get involved here with anything worse than AJs or AQo.
Flop
You obviously got bailed out by flopping the nuts, and I like your bet as well as the sizing.
Turn
The board pairing was obviously not, what you were looking for, and by leading into you he is saying, that the second J improved him. You could be drawing dead to a boat now, and raising would be an overplay. On the other side he could be doing this with trips, or he could be on some random bluff, so I am pretty much never folding the nut flush to this action. And I am certainly not folding in a freeroll, where some players could be bad enough to lead out with top pair or an overpair, because "LOL now I have two pair".
River
With trips on the board your hand went completely up in flames, and I definitely agree with your decision to fold.
Conclusion
Preflop was to loose but did not matter for the outcome, since the nut flush with AQ or AJ is the exact same hand as the nut flush with A7. Postflop was played absolutely flawless and is basically just a bad beat story, especially if he had a hand like AK or KQ. If he had KK or KJ, its not so much of a bad beat, and in that case the river card was actually good, since it saved you from going broke.