There are many companies specializing in optimizing this sort of operations. Usually it's best to set up a tree of companies, each with a specific tax to minimize or other special goal. Because of a few rulings by the European Court of Justice, citizens of the EU can set up companies anywhere they want and transfer profits from one to the other. Like you say, usually the last step (if you want to keep it within Europe) is Cyprus because of the low corporate profit tax. You'll probably also need a company in the country you work in though, local tax authorities often require it, and you'll need it for the VAT number.
I don't know about Luxembourg, but Belgium and the Netherlands also have special tariffs for high tech products. You'll want to look for specialized council though, most 'regular' accounts have no idea.
Thirdly, several countries like Panama have no corporate tax at all as long as you don't live there. Depending on what your life goals are, it may be an idea to build up a retirement account there. Again it is highly dependent on the circumstances.
I think companies specializing in this sort of operations are outside the reach of a normal startup. If you are big enough for that kind of services, you can just pay your accountant and/or lawyer to fix this. Having more than one company might also make the administrative overhead too big (you need two accountants, two registered offices where you pay some form of rent, etc).
I didn't knew Belgium and Netherlands have some special treatment for high tech products -- I'll look into it.
Regarding Panama, I have no information about them, but I'd personally keep things within Europe.
The outfits that I know are highly efficient - you can get such a 'tree' of 3 companies (for the 'Cyprus route', a reasonably well-known construct) including registration fees, rental of po box (you don't a physical presence in all countries you're registered in) for 5000 euros (excluding any share capital you may have to put up upfront). Not something you'd do on the first day of incorporation, but hopefully after a year this amount of money shouldn't be a problem any more. Don't try to organize all of this yourself - pay the intermediary a bit, they have offices across the EU with specialists who do this every day. You need someone who will provide you with exactly one point of contact that takes all the work out of your hands.
Re: 'just pay your accountant or lawyer', not to pounce on you but this is incredibly naive. Accountants and lawyers who spend 95% of their time doing mundane things like the books of the carpenter down the road are not qualified for this type of work. Any high-tech company owes it to itself to find highly specialized professionals, who will pay themselves back manyfold, even if you think they're expensive. (heck they are expensive. most charge 150 euro and hour or more, plus office overhead). Still when you're a real company (i.e. not doing 10k a year in iFart apps) it can be money well spent.
>Re: 'just pay your accountant or lawyer', not to pounce on you but this is incredibly naive
It was more of a joke, I was mostly trying to underline that I imagine this to be only for big companies.
Do these guys have a website ?
Anyhow, just the cost of the incorporation isn't the major criteria. I'm looking more at the total cost for such a thing: the total administrative costs over a year plus the total taxes must be well bellow what one would pay locally otherwise it's not worth the trouble.
As most expenses (accountant, rent) are rather fixed costs, this means that the whole thing becomes feasible only for companies that exceed a given income/profit.
A couple of famous ones are www.hjc.nl (although when I just googled them it seems that they are under bankruptcy since a few months, I'm not sure what's going on there) and www.quaedvlieg-juristen.nl . Generally companies like this say it becomes interesting at profits of 50k and up. Of course it depends, I mean if a founder needs to pay himself a salary that's going to be taxed locally (at least in part). It's very casuistic, but I don't agree that it only pays for huge companies; as soon as a company has a few employees and does business globally (quite easy for software), it becomes worthwhile to at least look into it.
I don't know about Luxembourg, but Belgium and the Netherlands also have special tariffs for high tech products. You'll want to look for specialized council though, most 'regular' accounts have no idea.
Thirdly, several countries like Panama have no corporate tax at all as long as you don't live there. Depending on what your life goals are, it may be an idea to build up a retirement account there. Again it is highly dependent on the circumstances.