Take it one step at a time ....
Step 1. Ball in the air, players within 10m must retire, they don't and are subject to sanction: PK at the place of the nearest player. In the OP that would have been at the original LoT. If no 'opponent waiting to play the ball' then ?????
Step 2. Ball caught in touch. Does ball in touch cancel off-side? Law 6.A.7(e) requires a whistle when the ball is 'out of play' so this would indicate that it does.
Step 3. Does the presence of players "prevent" the QT? Or did the thrower just chose not to?
If you don't whistle for the 'not retiring' when the ball is in the air then when the ball is caught all players can return to the LoT and then QT and LO laws apply.
Good, but really, a QTI is the taking of an opportunity, and that opportunity might not always be possible simply because of what happened immediately beforehand. For example, a player kicks to touch immediately he catches the ball from an opponents kick. He doesn't get a lot of distance and the ball goes into touch close to where his still retiring team-mates are. There is probably no opportunity for a QTi anyway. Those players are entitled to walk to the line of touch to form a line-out and, although technically they were offside under the 10m Law at the moment the ball was kicked, should not be penalised just because of where they happen to be when the ball crosses the touchline.
However, the play that I object to is the one I see in a similar scenario where the kick goes into touch some distance beyond those players, and one of them turns and sprints to towards the ball
for the express purpose of challenging a QTi. For mine, this player was offside under the 10m and took advantage of that fact.
[LAWS]11.1 OFFSIDE IN GENERAL PLAY
(a) A player who is in an offside position is liable to sanction only if the player does one of three
things:
• Interferes with play or,
• Moves forward, towards the ball or
• Fails to comply with the 10-Metre Law (Law 11.4).
A player who is in an offside position is not automatically penalised.
A player who receives an unintentional throw forward is not offside.
A player can be offside in the in-goal.[/LAWS]