SWE->SWE is relatively safe. And there are a number of significant differences between a truly "de novo" petition and a transfer. While it is true that you need a sponsor, and therefore a petition needs to be filed, you don't need to wait for it to be approved to start working at the new place. You can also have multiple prospective employers file petitions, so if one gets denied another might get approved, or if you get a better offer you get the option of picking and choosing. The process is still fraught with uncertainty (particularly if H1-B worker brought their wife and kids along), but you aren't really "starting from scratch" or undergoing the same degree of scrutiny.
It used to be worse, BTW: it used to be that you couldn't really change jobs at all, and until fairly recently, your spouse (who is typically on H4) couldn't work. Or to be exact, she/he could, but couldn't get paid (volunteering was OK).