MariaDB Insert queries stuck frequently
[very good] Do BULK insertions instead of many single insertions -- Yes.  Inserting 100 rows in a single INSERT can run 10 times as fast.

[good] Use transactions -- Multiple single-row INSERTs save some by doing this.

[it depends] Increase innodb_log_file_size -- There are metrics in GLOBAL STATUS that would help determine the utility of this.  (Your 768M is probably big enough.)

[minor] char(64) -- Is it truly fixed length?  If not, use VARCHAR.  If it is just ascii, then say so.  If it is hex, then consider using UNHEX() and putting it into BINARY(32).  Shrinking the size of the table always helps, but usually by only a small amount.

[safety] max_connections=10000 -- Shrink to something reasonable.  If you ever hit 10000, the system would (1) really bog down, and (2) swap, which would be terrible for performance.

[?] innodb_buffer_pool_size=240G -- This implies that you have at least 300GB of RAM?  How big is (or will be) the table?

[RAID] 4 drives just Mirrored?  No striping?  Hardware (better) vs software controller?

[2 unique keys] Each row must check both before committing.  Is the CHAR(64) a hash of some kind -- hence "random"?

[stumbling] If you have too many clients, they will just stumble over each other.  Your image show a rather long list.  (I don't have a good number for where InnoDB stops improving and starts stumbling.  But it sounds like you have too many.)

The first item will probably be the most productive.  But we can discuss the rest.