It is understandable to conclude that Mojave, or Catalina support and APFS support would mean the same thing. However, the operating system and the file system are, in fact, distinct from one another. While the operating system serves as the ‘window’ for interacting with drives in many ways, there is no API for dealing with the disk directly.
The current documentation from Apple does not include sufficient information to write a tool to defragment APFS volumes. The extent of the documentation on the subject so far is a feature flag labeled NX_FEATURE_DEFRAG which indicates whether an APFS container supports defragmentation.
If Apple releases additional documentation that provides sufficient information for manipulating the data directly on disk, we will explore whether a defragmentation feature is feasible for *rotational* APFS drives. Defragmentation on Solid State Drives in the traditional sense will not be supported, as organizing data on solid state devices only serves to increase wear, and provides no performance benefit.
Likewise, while the Volume Rebuild can repair many drives with volume structures problems, a full rebuild that reorganizes the volume structures can only be implemented once Apple provides further documentation.
It is important to note as well that Techtool Pro uses a low-level API to test, repair, rebuild, and defragment Mac OS Extended volumes. No such API yet exists for APFS, and it is unclear if Apple will make one available.