Yes it really happened, although the term "county fair" isn't exactly right, it was the annual show of the West of England Fat Stock and Poultry Society at Plymouth, England. See the below articles for details.
Vox Populi Nature 75, 450-451 (07 March 1907)
After weeding thirteen cards out of the collection, as being
defective or illegible, there remained 787 for discussion. I arrayed them in
order of the magnitudes of the estimates, and converted the cwt.,
quarters, and lbs, in which they were made, into lbs., under which form
they will be treated.
Now the middlemost estimate is 1207 lb., and the weight of the dressed ox proved to be 1198 lb
The choice of the "middlemost" (median) value, is because his purpose is to evaluate his earlier paper One Vote, One Value Nature vol. 75, page 414 (28 February 1907):
Each voter, whether of the jury or of the council, has equal authority with each of his colleagues. How can the right conclusion be reached, considering that there may be as many different estimates as there are members? That conclusion is clearly not the average of all the estimates, which would give a voting power to “cranks” in proportion to their crankiness. One absurdly large or small estimate would leave a greater impress on the result than one of reasonable amount, and the more an estimate diverges from the bulk of the rest, the more influence would it exert. I wish to point out that the estimate to which least objection can be raised is the middlemost estimate, the number of votes that it is too high being exactly balanced by the number of votes that it is too low. Every other estimate is condemned by a majority of voters as being either too high or too low, the middlemost alone escaping this condemnation.
There were letters to the editor concerning Galton's above articles, and Galton responded to one of those as follows, as published in The Ballot-Box Nature, Vol. 75, pp. 509-510:
MR. HOOKER, in NATURE of March 21, seems not to have quite appreciated my principal contention in the letters "One Vote, One Value" and "Vox Populi" of February 28 and March 7 respectively. It was to show that the verdict given by the ballot-box must be the Median estimate, because every other estimate is condemned in advance by a majority of the voters. This being the case, I examined the votes in a particular instance according to the most appropriate method for dealing with medians, quartiles, &c. I had no intention of trespassing into the technical and much-discussed question of the relative merits of the Median and of the several kinds of Mean, and beg to be excused from not doing so now except in two particulars. First, that it may not be sufficiently realised that the suppression of any one value in a series can only make the difference of one half-place to the median, whereas if the series be small it may make a great difference to the mean; consequently, I think my proposal that juries should openly adopt the median when estimating damages, and councils when estimating money grants, has independent merits of its own, besides being in strict accordance with the true theory of the ballot-box. Secondly, Mr. Hooker's approximate calculation from my scanty list of figures, of what the mean would be of all the figures, proves to be singularly correct; he makes it 1196 lb, (which is the mean of the deviates at 5°, 15° 95°) whereas it should have been 1197 lb.
So initially Galton did not publish the average. Mr. Hooker estimated the average as 1196 lb. based upon the percentile values in the published article. Thereafter Galton published the actual average, which was 1197 lb.