The key point, as previously mentioned, is ensuring sufficient substance in the companies outside of Spain to avoid the characterization of them being managed from within Spain, which could potentially trigger Spanish corporate tax liabilities.
The suggestion of operating your business directly...