Its not so simple. As an Expat living in Spain for 17 years now, foreigners dont have it so easy to ask Residency on a camper van. First, the camper have to be registered as Furgon-Vivienda, not every conversion is good. But, to be an ower of one you need a NIE and for a NIE you need a previously address. You can’t really come from germany and ask for empadronamiento in a camper van.
About Portugal, if you plan to be there for more than 3 months and assuming you are european, you need residency. And an address.. also, you need to legalize the van. Draconian laws..
On the bright side, the Municipal Campings are SUpER cheap.. You possible can live for a month for 250 with some services.. Dont quote me on prices. Last vacation was like 3 years ago. But i know the place