Three Phase Input to Single Phase Output
Conceptually this is an easy problem, the reality is that you are dealing with relatively large load currents (40 A) and several 10's of KW.  This all combines to very large components, with relay like switch gear, switching between phases which will cause glitches and drop outs just through the switching action.  Also, I suspect that is a very dynamic situation, and having relay contacts hammering away at the phases are dynamically changing will wear them out very quickly.

Any way you look at it this is not a trivial problem to solve.

The one solution I can think of that will provide the smoothest transition between phases is to duplicate a non-bypass type UPS (Uninterruptible Power supply).  This would comprise of a 3 input full wave bridge rectifiers that are generating high voltage ripple DC, the AC input with the highest voltage automatically contributes the most.  And then you run an inverter that generates a stable 220 V AC @ 40 A from that HV DC rail.

Designing and building such an inverter is not a trivial task, but perhaps you can buy such a unit.

Because of the wildly fluctuating inputs (from 110 - 290 V) it might be better to have 3 transformers @ 2:1 step down ratio, 3 bridge rectifiers that generate your HV DC rail at ~ 110 V DC ripple that then is fed to your inverter which boosts it to 220 AC.  But this is even a harder design at these high power levels.

It is entirely possible that one of these stabilizer units that you linked to could possibly fill in as your inverter.  But it very much depends upon how they are designed.