Minimizing and Handling Deadlocks Strategies
This is a "normalization" table?  That is, it is a mapping from name to a shorter id?

If so, simply remove it from the transaction.  You don't really need to rollback if there is a failure.  At worst, you might have a few extra rows in the table that are never used.  Outside the main transaction, have autocommit=ON.  And, there is probably no need for IODKU, so simply use INSERT IGNORE.

Change from

UNIQUE KEY `name` (`name`),
PRIMARY KEY (`id`),


to

PRIMARY KEY(name),
INDEX(id)   -- sufficient for auto_increment


Rationale:  Multiple unique indexes slows down INSERTs.

Caveat:  Under what conditions do you look at the "changing_date" columns?  If you are coming from id, then your indexes are better due to clustering.

Another thing to note:  All(?) forms of INSERT, including IODKU, "burn" ids.  That is, you will find lots of gaps in the id values.

Since you are inserting at a mere 1+/second, I don't think you need any kind okf batching.  But if they do come to you in clumps, then here is a discussion of how to do that efficiently: http://mysql.rjweb.org/doc.php/staging_table#normalization