Hi Francois,
yes, any reset can be used including SW reset.
There are two options: if your programming tool support this functionality, yes, it can be partitioned at programming time. If not, you can check by your software if the partition is already set and if not, perform the partition. So, it will be done during first startup of the programmed device. Depending on used tools in a factory, you can trigger reset after programming, wait for certain time, so the device is partitioned and then you can turn it off. So, the device will leave the factory as already partitioned.
Regards,
Lukas