Image Builder & Partition Sizing

I'd like to run OpenWrt, on a Raspberry Pi 4, with a 32gb SD card and SquashFS. I plan to run various containers and would like about 1gb for writeable OS data and 16gb for application data. The application data must not be erased by sysupgrade. I typically use the image builder container, to build my images. What would be the best way to build images that meet my requirements? I've hit a couple of problems already, in doing my research, but please feel free to raise anything that I haven't discovered yet.

  1. The JFFS2 partition size seems to be set by CONFIG_TARGET_ROOTFS_PARTSIZE. However, it seems like editing the .config file is the only way to change that. Is that correct or am I missing something? I have seen multiple comments stating that environment variables cannot be used for this.

  2. I read that sysupgrade will nuke partitions, if the partitioning of the new image doesn't match the existing partitions. I haven't been able to find a way to guarantee that the application data will survive, without resorting to a USB drive or similar. Does anyone have any ideas?

Any help would be greatly appreciated!