I have a question.
Present tense. Right now I have a question.
I have had a question
Perfect tense. At one point, I had a question. It may or may not be true that I still have it now (might be made clear from the rest of the sentence).
I had had a question.
Pluperfect. At one point it was true that at an earlier point it was true, that I had a question. "I had had a question for some time, but I never got a chance to ask it".
Now, in each of these the verb have is used once in the sense of "to possess" or "to hold" and in each of the second two it is used as an auxiliary to modify that other have.
You propose.
?I have had had a question.
Which we would presumably have to interpret as some sort of super-perfect stating that at some point it was true that at an earlier point it was true that at an earlier point it was true, that you had a question. It's not clear what you are saying about the current state.
As such, you've just created a non-standard variant of either the perfect or the pluperfect, but you leave us confused as to which - and imply that you are confused about the matter yourself.
You suggest it might be better as:
?Having had had a question, I asked it.
But this presumably would mean that it being true that at one point it was true that at one point you had a question. Again, it's not clear just what this is supposed to mean, and one possible interpretation has this as impossible (because one way of untying the knots leaves us with the suggestion that you no longer had a question at the time you said it).
In all, this reminds me of some comic nonsense writing that has been done - sometimes well - but were the whole point of it is that it was not good English. Barring that goal, none of this makes any sense.
You talk about "unique time travel situations", and I could see someone deliberately engaging in this sort of abuse of auxiliaries to describe that. Still, the implication is "this time travel has so messed with the logic of causality that English grammar can no longer work to express the resultant mess". Once you're doing that then you've deliberately thrown the rules of grammar away for effect anyway, so asking if it's grammatical is not just besides the point, but counter to it.
Really though, this is not grammatical English. Nor is it a useful construct to anyone who perceives time and causality as being related things.
Had/has/have been is usually used for something that was done in the past and still applies (multiple events).
Was/were usually applies to something done in the past that no longer applies (single event).
Example:
- The well had been producing clean water.
- The well was producing clean water.
The first sentence implies that the well still is producing water, but it's no longer clean for some reason.
The second sentence implies that the well is no longer producing water.
Of course, context is very important. Here's another example:
- I had been running.
- I was running.
The first sentence implies that 'I' had, at some point of time, run. It could have been earlier in the day, or even the night before.
The second sentence implies that 'I' have just finished running a little while ago.
As you can see, context is heavily implicated. How long is a while?
Consider:
- I had been running to get fit.
- I was running to get fit.
The two now emphasize two different things. The first implies that perhaps 'I' originally ran for health benefits, but continue to do so for other reasons. The second implies that at one point they ran to get healthier, but a strong implication that they have stopped.
Best Answer
It looks as if something has been left out from this sentence, the meaning isn't clear as it is. It would look natural like this:
When we entered, we realised he had already been there.(Meaning: he went there and left before we did.)
I suppose it is the choice of the verbs used in the initial sentence that doesn't make the meaning clear. If you want to express that he was there before we went to the particular place, then you should say "When we entered he had already arrived" or "When we entered he was already there."