Once only, but I've thought about these configurations a lot.
Obviously it can be complicated when the existing wiring system has multiple panels, etc. But the basic idea is just to ensure that the generation panel has room for the future PW (ESS) breakers, and that the backed up panels and feeders have the capacity to allow the feeder segment(s) to the non-backed panel(s) to be resupplied from behind the Gateway (MID) without having to upsize in the future.
That's all for a 200A service or under; for a 400A service, whole house backup with a single Gateway is quite complicated.
Cheers, Wayne