There are many prayers to St. Joseph referring to him as “the dispenser of the treasures of the Sacred Heart of Jesus” but I’ve been unable to trace the origins of this phrase.
Devotion to the Sacred Heart of Jesus grew gradually over the Middle Ages but did not become a widespread Catholic devotion until the private revelations of St. Margaret Mary Alacoque (1673). In his encyclical (letter) on the Sacred Heart of Jesus, titled “Haurietis Aquas”(1956), Pope Pius XII noted that the heart of Jesus was nourished by the loving home life he shared with Mary and Joseph.
I’ve been unable to find any further history of the tie between St. Joseph and devotion to the Sacred Heart. Perhaps another of our Bustedhalo readers can enlighten us!
Blessings to you, Fr. Joe