Elderberry will grow in sandy conditions as long as the water table isn't to far
underground. (the
roots of elderberry can go quite deep when given the opportunity)
The natural habitat of Elderberry is stream side or any place with a rather high water table, if a willow will grow there, so will an Elderberry.
If you want to increase the water holding ability you will want to add some clay to the soil. The best method of doing this is with your compost mulch, just add some clay to the compost heap in very thin layers, then when you apply it, the clay will be along for the ride.
Another method is to use mushroom slurries over the area you want to hold more water. Fungi are great at coagulating particles into conglomerates which allow for more water to be held in the sandy soil.
The compost feeds the bacteria and fungi as well as providing
carbon and other organic materials, over time the simple act of using compost as mulch will do wonderful things to the structure and microbiome quantities.
Redhawk