macOS equivalent to the Windows "Compress file/folder content on disk to save space" option
This is actually a feature of the NTFS file system (I believe...) and hails from the days when disks were more expensive, much smaller and measured in megabytes. Microsoft has kept this functionality in all versions of windows since the early days of NT.
While you can manually compress files to save space I realize that is not what you are looking for. However I am not aware of a utility or feature of macOS that allows automatic file system level compression of disk contents.
Note that in an article on ArsTechnica it is noted that it sounds like file system compression may be coming to APFS in the (near or otherwise) future.
There may be something in APFS that allows this but so far neither Apple nor any third parties (that I am aware of) has implemented this functionality.