Consultant working from Spain

Dear All,

I’m a french citizen who lives in Spain. I’m currently working as an independent consultant. My tax regime in Spain is Autonomo and all my customers are outside of Spain/Europe.
I may sign a new contract that will significantly increase my income. I won’t use all this salary; so it could stay parked on a company account. Therefore I’m wondering if I have other legal options to optimize my tax rate. Things like creating a company in Spain, or in Estonia/Malta.
Any pointers or contacts that could help me would be highly appreciated