Numbers in tables: align by decimal point *and* flush right?
Use the following as your column format:
S[table-format=3.2,table-number-alignment=right]
I don't think that's actually going to look as good as you think, but....
Probably the most straightforward way is to fill out the numbers all to the same number of decimal points, and then right-align them. You obviously don't want to print out all of that, so use \phantom
on the parts you don't want to print:
foo2 & 22,222 & 2,222 & 222\phantom{.00}\\
foo3 & 33,333 & 3,333 & 3.33\\
foo4 & 44,444 & 4,444 & 44.4\phantom{0}\\