There are facilities in bars, cafes, even some stores, hotels, some parks, shopping malls, markets, IT offices, etc.
Some towns have a toilet in the town square or town park.
That is when you are in a town or city.
It is nice to leave a few cents on the bar before going in to the throne. Or leave few cents on exiting.
OR, buy something at the cafe/bar. Then hit the throne. i.e. coffee, beer, roll, toast, candy, etc.
Keep few coins handy when in bus stations in Spain and Portugal! There is a small fee to use the throne in some of the bus stations.
Also may be a few "pay to go" thrones in train stations.
So best to always have a few coins handy.
Always have your own tissue handy. See tip below if you don't have your own tissue in a bar.
If not option is to Poop in the woods...
Good reads:
https://gizmodo.com/how-to-poop-in-the-woods-1599311733
Good tips for doing poop in the woods.
Yep, there is lots of it on, rather off to the side, of the camino.
If you must, please have and use a trowel. Dig a cat hole. and like a cat cover it.
OR, bag it out. You can buy special poo bags for this deed.
When walking the Frances there was lots of TP and poop in the bushes and behind rocks. Most not covered up.
As stated above, most towns have a cafe or bar. And facilities are available there.
If you gotta to go, you gotta go. But cover it up please.
Tip: if out of TP and going into a cafe or bar, grab a few napkins in the cafe/bar before entering the throne room. In a emergency it works. Leave a little tip if possible.
I laugh when people for their first time use a "bomb sight" squat toilet in Spain.
Yep, they are still in use. Just aim well. No one will break the toilet seat! LOL
http://www.toiletinspector.com/toilet-designs/squat-toilets