1) While Switzerland combines several ethnicities and cultures, the fusion dates back almost a millennium. The Old Swiss Confederacy arose in the 14th century, before Italian, French, and Romansh were even recognized as separate languages.
2) The Swiss federal structure goes to great lengths to give autonomy to the distinct groups.
So it’s not accurate to say that Switzerland is “homogenous” in the same way Denmark is homogenous. But it’s not like Switzerland’s Italian-speaking population grew from nearly 0% to the current 8% over a period of a few decades. There is a common umbrella identity encompassing these groups that dates back a long time.