Just to clarify - samba is built with avahi support, but it is not built with Avahi support for Apple Time Machine destinations. This it is possible with a simple compile time switch As per the samba mailing list, fully Time Machine support needs to have the arg --enable-spotlight in the samba compile configs.
https://lists.samba.org/archive/samba/2019-September/225824.html <https://lists.samba.org/archive/samba/2019-September/225824.html> Enabling this option allows us to use the smb.conf option "fruit:time machine = yes” that signals avahi to advertise a Time Machine destination over mDNS