Nextcloud 16 is unsupported.
But the error is perhaps something with DB tables and timeouts.
Perhaps something is too slow or your external storage is to big.
Read an example Corrupt DB-Tables?
Perhaps you can increase "nnodb_lock_wait_timeout”
Please upgrade to newer nextcloud versions.