One solution that's perhaps easier, that doesn't require as much edits to the build environment, is to simply go through the usual compile.sh process (using the default ext4 for root) and convert post installation. This way you don't need to worry about partition resizing, and it gives you the option to encrypt root as well.
You'll only want to ensure that the BOOTSIZE parameter is not 0, so that separate /boot and / partitions are created in the image. For the BananaPi, I used 16MB as you did.
Once you've put the image on an SD card and gone through the initial boot, use a USB flash drive (or SATA drive) to temporarily mount as root. To do this, create a single ext4 partition on the USB drive, mount it (e.g. mount -t ext4 /dev/sda1 /mnt/usbdrv) and copy the contents of root to it (e.g. rsync -arx / /mnt/usbdrv). Now edit /boot/boot.cmd and set the root device as /dev/sda1 (assuming that's the partition you just copied root to). Rebuild the boot.scr (i.e. mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr) and reboot.
You'll notice that the USB drive (or SATA) is now mounted as /root. This allows you to easily re-format the former root partition on the SD card (e.g. /dev/mmcblk0p2) as f2fs, with the ability to optionally encrypt the root partition using cryptsetup before you format it as f2fs. And it will preserve the size of the former ext4 partition, so no need to worry about the possible lack of f2fs resizing. Once you've mounted (e.g. to /mnt/sdcard) and copied the root files back over to the newly formatted /dev/mmcblk0p2 (e.g. rsync -arx / /mnt/sdcard) edit the /etc/fstab file on the sdcard to properly mount root using f2fs (e.g. /mnt/sdcard/etc/fstab) then you can just edit the /boot/bboot.cmd file to point back to /dev/mmcblk0p2, recreate boot.scr, take out the UBS flash drive, and reboot. If you do opt for encryption, you'll need to also edit crypttab (e.g. /mnt/sdcard/etc/crypttab) and edit the boot.cmd to reflect the use of an encrypted root (e.g. root=/dev/mapper/cryptroot cryptdevice=/dev/mmcblk0p2:cryptroot).