Create a TOTP for machines using HMAC or AES
Be reassured: both $\text{HMAC}(k,m)$ [instantiated with a strong hash function, e.g. SHA-512; even SHA-256 would do] and $\text{AES}(k,m)$ [understood as direct encryption of 128-bit $m$ with the block cipher] are believed to be computationally secure Message Authentication Codes for the foreseeable future when the key is 256-bit, irrespective of how many message/cryptogram pairs are available. Both can be truncated: 64-bit would be ample if the verifier limits the attack rate.
$\text{HMAC}$ has the security advantage of being less susceptible to cache-based side channel attacks than $\text{AES}(k,m)$ is, for implementations in software without AES-NI on CPUs with caches.
From a functional perspective, $\text{AES}(k,m)$ has the slight advantage that (if kept 128-bit) it conveys the timestamp $m$, which can be recovered by decryption. Otherwise  we may need to transfer or guess some low bit(s) of the timestamp to fix any drift there may be, especially at startup.
Whatever the MAC, one operational vulnerability is likely to be the establishment and storage of the long-term 256-bit key $k$. There might be other attacks on the protocol, which is not described.