I don't use autofs, but the doc (https://www.kernel.org/doc/html/latest/filesystems/autofs.html) states that you can do an ioctl on the root directory of the autofs filesystem:
AUTOFS_IOC_SETTIMEOUT: This passes a pointer to an unsigned long. The value is used to set the timeout for expiry, and the current timeout value is stored back through the pointer.
So, it seems that it is not so much systemd that reads the time-out, but it is a feature of autofs.
For regular file systems, there is no such option. You could take the read counters in /proc/diskstats on a regular basis and if they haven't changed for a while.