This has been effectively solved with the launch of the new editor

A. upgrade your page to the new responsive editor

B. Change page formatting from “fixed” to Columns or Align-to-Parent.

C. Set conditions on your groups to show & hide when certain conditions are met. This can be when another group is visible, an option state, URL params, etc.

D. make sure to toggle the setting, collapse height on each group who’s height you want to collapse when hidden.