Frankly, I think Scotty's participation in "Relics" hadn't been entirely thought through.
In the holodeck scene Picard tried to connect to Scotty. Well, his Stargazer
was a ship design Scotty had probably mostly seen blueprints of in the 23rd Century, so it might have been interesting for Scotty to learn how the actual ship performed.
But it's the end of the episode I really didn't find convincing. Already during the course of the episode it had been made clear how alone he felt in the 24th Century.
So what's the solution? Give the man a shuttlecraft, get him off the ship and let him handle the ultimate loneliness he will surely encounter boxed into a small shuttle among the stars.