When the story was published, No. Later on, not really, but close.
When Action Comics #276 came out in 1961 Brainiac had only appeared four times before.
- Action Comics #242 (1958). Superman didn't really defeat Brainiac, but managed to sneak out of his ship while carrying Kandor, the city that Brainiac once shrunk and put in a bottle, while Brainiac was in suspended animation during the ships journey.
- Superman's Girl Friend Lois Lane #17 (1960). Where Brainiac threatened to blow up earth unless Superman let him try to kill Lois Lane and Lana Lang as a kind of revenge. Superman solved it by giving the girls superpowers and Brainiac left after he failed.
- Superman #141 (1960) Where Superman accidentally flew into the past and landed on Krypton at about the same time Brainiac was there. He never interfered with Superman but just stole Kandor and left.
- Action Comics #275 (1961) Brainiac zapped Superman with red and green kryptonite and mutated him slightly. Superman managed to defeat Brainiac for the first time, but not by shrinking him. Instead Superman knocked him out and jammed the controls of his spaceship which sent Brainiac away to a distant planet in another time.
The next number of Action Comics was the one with Supergirl and Brainiac 5. In the story Supergirl is told about not just any confrontation between Brainiac and Superman, but the last one where Brainiac was defeated for good. None of it had happened in a comic before, as you can see, and was possibly just an idea for a future story by its writer Robert Bernstein.
11 years later in Superman #338 (1979) the Superman comic had been published for 40 years and as a way of celebration DC apparently thought it was time to make that story become real. In the comic Superman had finally discovered a way to restore Kandor back to its former size with a special enlarging ray. Superman was not entirely sure that the cure will work so he decided to test it on himself to make sure. For it to be authentic Superman had to be shrunk down by Brainiac in the same way the city was, so he tried to manipulate Brainiac to do precisely that. Superman built a special beacon that was supposed to give Brainiac a computer version of a headache, this annoyed the villain enough to attack Superman on sight and shrink him to the size of a bug. Naturally Superman did not come unprepared, he had brought Supergirl equipped with the enlarging ray. Brainiac tried to shrink Supergirl too, but the shrink ray got deflected by the enlarging ray and hit Brainiac with full force. As a result Brainiac and his ship shrunk to subatomic size and was gone.
It looked very mush like story Brainiac 5 referred to although it differs on a few points.
1) It was Supergirl that defeated Brainiac this way, even though it was Superman's plan.
2) Brainiac was not forced into the shrinking ray, but had it reflected back on him.
That story was also remarkable in another way. Superman #338 ended with Superman using the ray on Kandor, and it kind of worked. The city itself was lost but all the people was returned to normal. With that comic DC apparently attempted to end the 21 year old arc about the bottle city of Kandor for good to make way for future developments after the celebration. If DC at the same time planned to end the stories with Brainiac and kill him off, in a way similar to how they once showed he died, is possible, but that is only speculation. Ether way, both Kandor and Brainiac eventually was returned to near normality again a few years later.