To answer your question, there are good windows software package to read and write to APFS, however you don’t need this and none seem to allow partitioning or setup like you ask.
The stand alone installer knows enough to run Disk Utilty and prep a drive, so you don’t need a formatted drive. When you run the installer it will detect the bare drive and offer to erase, format, partition and install the OS.
Just boot up the installer and connect the new drive. It can be internally connected or externally connected and the installer will do the correct erase and format for you.
Your Mac might even be able to boot to internet recovery to get Disk Utility to partition the disk with zero local bootable OS or installers. Here is a step by step guide that Apple keeps updated for this procedure.