It doesn't work the same way, is not heritable, you can't compress folders (themselves), you can't modify (or add) information to a LZX file while maintaining the compression, if you do so, the file is decompressed entirely, like a new file, and you need to re compress it again.
Compact help gives:
"Directories will be marked so that files added afterward will be compressed unless /EXE"
Adding a byte decompress the file:
echo a >> test.txt
LZX files are like "zip files" (more like GZ) made transparent to the OS, but they are not the same as common compressed files in the old NTFS way.
The solution I propose is using a scheduled task to run the compact command while the computer is idle (or run after backup), and also I recommend to only compact with LZX: dll and exe files in working programs, ( if they are not backups as your example ), to prevent potential slowdowns and issues (do not! compress the boot files in the root directory).
If your files are already compressed with the old method, you need to add /F to force re-compression the first time you do it, and remove the compression from the folder itself to prevent the "weak method" from being used, or make a more complex program to find and re-compress weak compressed files.
Also remember that LZX is not compatible with previous version of windows.