[A humble request: If you can, please donate to help me carry on tracing word histories. Thank you.]
The noun sandcastle designates:
– (literally): a small castle-like structure made of wet sand, as by children on a beach;
– (figuratively): a plan or idea with little substance.
—Cf. also origin of ‘castles in Spain’ and ‘castles in the air’.
The earliest literal uses of the noun sandcastle that I have found are as follows, in chronological order:
1-: From Conversations of a Father with his Children (London: John W. Parker, 1833) [Vol. 2]:
[page 20]:
Conversation III.
The Sand-Castle.
[page 21]:
M. Yes, Charles, and you do not forget, surely, that papa told us last night, he remembered so well making them when he was a boy, and since too (was it not, papa?) I think we had better let us see how he makes a sand-castle first, and we can imitate him another time.
2-: From Falkner (London: Saunders and Otley, 1837), a novel by the British author Mary Wollstonecraft Shelley (1797-1851) [Vol. 1, page 122]:
She remembered how her hours had been spent loitering on the beach—sometimes with her little book, from which her mother had taught her—oftener in constructing sand castles, decorated with pebbles and broken shells.
The earliest figurative uses of the noun sandcastle that I have found are as follows, in chronological order:
1-: From Infidelity in its perilous bearing on the present and the future state of man (London: James Nisbet and Co., [s.d.]), the transcript of a lecture that the Church of England clergyman Hugh Stowell (1799-1865) delivered on 12th June 1837 in St. Matthew’s Church, Manchester, Lancashire [page 7]:
Look upon man with all his wonderful bodily mechanism, and with all his faculties of head, and qualities of heart—look upon him as the child of chance and the sport of circumstance, unconnected with anything above, and undestined to anything beyond—toiling, trifling, laughing, weeping away his fitful fleeting hour, and then dissolving into nothing—look upon man in this light, and what a vanity is his life, what a contemptible riddle is he himself; his lofty imaginations—gaudy bubbles, his splendid schemes—sand-castles on the shore, his sorrows frivolous, his pursuits childish, his hopes idiotic, and his mirth madness.
2-: From Una; A Double Story, published in The Churchman’s Companion (London, England) of September 1856 [chapter 3, page 167]:
“I wonder whether he has told you what a complete little noodle I am?” thought Edith, “whether you already know how my good resolutions are built up like sand castles, and blown away with every changeful breath of folly and fancy?”