Not a lawyer, but married to a divorcee.
This scenario doesn't work as you expect if you get your first high-paying job and are served with divorce papers a week later. You have to be making that much money for something like 1-2 years for it to be considered any sort of baseline.
IMO, salespeople are hit hardest by this due to economic boom/bust cycles. You live an extravagant life when times are good, then get divorced during a recession and end up absolutely ruined because your earning potential (and imputed income) are tied to factors beyond your immediate control.
Bankruptcy does not relieve you of child support obligations. Unsure about alimony, but I doubt it.
If you have to get a lower-paying job after maintaining a higher-paying one, you can file for a modification, but you can only do this once every 3 years or so. It works both ways too-- your ex can file for a modification of child/spousal support (every 3 years) if they anticipate raises or promotions on your part.