"Spirit", "Water", and "Blood" only ever occur together in 1 John 5:6-8. The idiom is explicitly explained in that passage (including V5, BSB):
5 Who then overcomes the world? Only he who believes that Jesus is the
Son of God. 6 This is the One who came by water and blood, Jesus
Christ—not by water alone, but by water and blood. And it is the
Spirit who testifies to this, because the Spirit is the truth. 7 For
there are three that testify: 8 the Spirit, the water, and the
blood—and these three are in agreement.
While these three words, spirit, water & blood do not occur elsewhere together, pais of them do occur as follows:
Blood & Water
These two most frequently together and always connected with ritual sacrifice, wounds or murder: Matt 27:24; John 19:34 (Jesus crucifixion); Ps 79:3; Lev 14:51, 52; Deut 12:16, 15:23; Ex 7:21; Eze 16:9, Heb 9:19, etc
Water & Spirit
Again, these two are often connected and frequently indicate that water was used as a symbol of the Holy Spirit and/or baptism: Acts 1:5, 8:39, 10:47, 11:16; Matt 3:16; John 1:33, 3:5; Mark 1:8, 10; Neh 9:20; Isa 44:3; Gen 1:2; etc.
Spirit & Blood
This pair occurs together but the connection is much less close. They usually occur in places discussing Jesus' sacrifice: Luke 22:44; 1 Peter 1:2; 1 Cor 11:27; Acts 20:28; Heb 10:29; Isa 4:4, 31:3; Gen 6:3, etc.
Thus, the three words do not occur together anywhere except in 1 John 5 as stated above. Therefore, 1 John 5:6-8 is no more a literary allusion to John 19:34, 35, than to any other of the single pairs of references listed above.
However, as stated above, the passage in 1 John 5:5-8 explains itself. The reference to "water and blood" is clearly an allusion to John 19:34 when the soldier pierced Jesus' side. The reference to the Spirit testifying to the truth is also an allusion to John 4:23, 34, 14:16, 17, 15:26, 16:13, 15; Acts 7:51, 28:25; Rom 9:1; Eph 1:13; 2 Thess 2:13; 1 Peter 1:22; 1 John 2:20, 4:3, 6, etc.
The passage of 1 John 5:6-8 is a passage similar to John's other writings where he calls on various witnesses to establish the truth by the Spirit of truth and the events of the Cross, namely the water and the blood.