What you assume loosely is exactly what you should understand in my opinion.
It seems to me that this usage of "que" is none other than "que" as "quoi" or more exactly "de quoi", "quelque chose", which persists nowadays in certain turns; this analysis makes then of "que" an indefinite pronoun and not a pronoun in indirect interrogative use¹ as the TLFi would have it;
(TLFi) II a) 2. b) [Constr. avec l'inf., en concurrence avec quoi] Il ne sait que dire. Il ne savait que dire (MARTIN DU G., Thib., Cah. gr., 1922, p. 640).
This means that "Il ne sait quoi dire." is quite correct too (and of course means the same thing). You do not find that form much (an ngram gives nothing) but the variant in the first person imperfect tense is common (ngram, "Je ne savais quoi dire.").
"Que" does not connect the verbs but is the object, "que" meaning "something" (quelque chose); in modern French "à" is used but in the now old language of Madame de La Fayette there was no connection: "que faire" was right and "que à faire" meant nothing.
You could put it that way in modern French;
- … qu'il n'y avait pas là quelque chose à faire quand elle n'y était pas…
"de quoi faire" wouldn't be idiomatic" and "quoi faire" would not be good syntax.
The words in italics are the necessary modern additions to make the sentence correct.
You can see well enough that the pronoun is an indefinite pronoun if you replace it by "rien", which is a pronoun of this type and which results in the same meaning;
- … qu'il n'y avait * là* rien à faire quand elle n'y était pas…
¹Cf. TLFi *III B 2.**.
- On ne voit pas quoi serait remis en question par ces développements. (ex. de user LPH)