MariaDB is Forgetting Previous Auto Increment IDs
No, that is not the guarantee of AUTO_INCREMENT.  It only assures uniqueness.  It does not assure deleted number won't recur.

Old numbers will be resurrected in this scenario (and perhaps others):


DELETE the highest sequence number(s).  (Or TRUNCATE or ROLLBACK, ...)
Restart mysqld (or power failure, ...)
InnoDB, as it opens the table, computes the next id to use as MAX(id)


You need another mechanism, such as

CREATE TABLE seq (
    id INT UNSIGNED AUTO_INCREMENT NOT NULL,
    code CHAR(1) NOT NULL,
    PRIMARY KEY(id),
    UNIQUE(code)
) ENGINE=InnoDB;

INSERT INTO seq (code) VALUE ('a');   -- initialize only

To get next number:
INSERT INTO seq (code) VALUE ('a')
    ON DUPLICATE KEY UPDATE id = LAST_INSERT_ID(id+1);
then use LAST_INSERT_ID() to retrieve the new number: SELECT LAST_INSERT_ID();


Notes:


This allows multiple sequences, based on code.
The nums will be monotonically increasing (never dup, never decrease).
It will provide consecutive numbers (no gaps).
It will not back-fill.
It will survive crashes; deletes from your table; etc.
If you get a new number inside a transaction, replication could generate the ids not in chronological order.
If you get a new number outside a transaction (autocommit), you could 'burn' the number (create a gap) if certain failures occur.


(There may be something simpler.)