I think that this hand probably ended up right. Whatever the outcome.
He could very well be calling with a small pair, 2 pair, or a set. That he called your raises should slow you down some. Sanity prevails, but consider he might see this as weekness and pop it with air. He could just as easy be bluffing
as holding the nut 78, but the 78 at no time (until his gutshot filled) would have warranted calling your raises. The flush draw could account for his calls, but that busted on the river.
His last bet seems peculiar, and with no reads, I would think it was a half hearted steal attempt after you wavered on the turn, and I would call. With the stack sizes showing here, in your position I might even have check reraised the river.
So, because you had no reads, and because he played this in a most threatening way (passive, passive, strike), I think that because this hand killed neither of you here, it ended fine. Not every confrontation needs to be deadly. A better idea is to work
on maximizing gains and minimizing loses, not absolutely maximizing every opportunity. The work part will result in slightly bigger gains, and slightly smaller loses.