I suppose you’ll do “El Camino de Santiago”, the northern path. I live in Madrid and know some people that have made it, not the northern but the main path. Now, perhaps I’m wrong but if you know a town or city you’ll pass at some point, you can talk with an hostel or posada in advance and they could receipt the box for you. Hope it helps!