If this is still being built then the easiest way to solve the problem would be to split the data into separate databases. MyQL replication operates at the database level. But do be aware that async ...
Out Of Memory Suggestion to consider for relief.
Create 10G SWAP Space.
It would be better to run slow for a few seconds than deal with OOM.
Rate Per Second = RPS
Suggestions to consider for your my....
You could check the logs for lines like
Could not increase number of max_open_files
Please check your settings for LimitNOFILE and LimitMEMLOCK in Your /usr/lib/systemd/system/mysqld.service.