My rule of thumb: You get XP when you find a solution for a given encounter or situation.
Figuring out how a trap works and how to evade it gives XP to the group. Applying this solution again does not give anymore XP. If things change, and the group needs to figure another solution for the same trap because the circumstances changed, that's another opportunity for XP.
Group A uses a floating spell to avoid a pit full of angered, flaming zombie kobolds. They are awarded XP. For some reason they have then to backtrack, and use the same spell (thus, the same solution), to go past the same pit. No new XP is awarded.
On another moment, they need to get past this pit one more. However, things are now different - the mage has no more spells to cast, and they find themselves with a completely different context. They need to find another solution and thus have another opportunity to get a reward.
It isn't the act of avoiding the trap that grants the player the XP. It is the figuring out which act do you need to begin with - and executing it properly afterwards, of course.
For a given creature, beating it again - be it revived or not, maybe it survived the first encounter - is always an opportunity for XP. The context changed! The players got more experienced, the creature probably is also now more experienced. They won't have the same resources or the same allies. They will be aware of each other's tactics. Heck, even the luck of the players won't be the same. Maybe your warrior got a few lucky 20's the first time, but on this second time they end up getting a bunch of "1"s. There is a lot of variables changing, and so it won't ever be "the same". The solution for the encounter isn't same. Thus, repeated encounters with the same creature - when properly conducted by the DM - should most likely award XP.
Your example of the repeating the tactic against the dragon, however, falls on a different place. It is a weird, unlikely case that the dragon will fall for the same trick over and over. If the players repeat the same tactic in this case, what should happen isn't then getting XP - is the trick failing, the situation getting more complex and interesting, and the story taking a different turn.