If a question is off topic, then vote to close with an appropriate close reason. It doesn't really matter if it's old or new. Site standards do change over time, and whether a question is open or closed should reflect its current status relative to the subject scope of the site. For a long-term, well established user on the site to have a few closed questions on their profile isn't really a big deal at all; and for someone who hasn't been around in a few years, it's not likely to make one iota of difference. There's little reason to actively look for old, close-worthy questions, but if you come across them while browsing the site, you shouldn't feel bad about voting in the same way as if the question had been posted that same day.
Questions only get auto-deleted if they have a set of properties that indicate that they are not useful to the community. There is a number of situations when posts are deleted by the system, but the main one that applies here is the RemoveAbandonedClosed automatic delete reason:
- The system will automatically delete closed, unlocked questions with zero or negative score having no positively scored or accepted answers or pending reopen votes, that were closed for any reason other than duplicate nine or more days ago and haven't been edited in the past nine days. (
Note that there is a number of criteria here which must all be met for the question to be a candidate for automatic deletion as "RemoveAbandonedClosed".
In general, questions are protected from deletion (not just automatic deletion) when they have been net upvoted, or when they have net upvoted answers. The linked Meta Stack Exchange answer has the full details on when posts can be deleted and when they cannot.
I don't think we need to apply historical locks, except possibly if a question is now so off topic that we don't even want people to vote on it and its answers, or be able to leave comments; certainly not wholesale. Closing the question as off topic while leaving a comment along the lines of "this type of question was within scope when it was posted, but it is now off topic because..." should be sufficient.