It depends on how much time each mutation takes. Action scripts can take up to 1 second of CPU time and a maximum of 30 seconds of total time. I don’t know how much cpu time all those mutations would take-it probably depends on how much data is in the mutations. Plus to get a rate of 15 mutations per second for multiple seconds you would probably have to run them in parallel instead of awaiting them and then add logic to pace the requests to the rate limit.
Changing 5000 records in a single run of an automation script is theoretically possible if the data changes are very small and nothing else happens that takes much cpu time. But in practice I don’t think it is realistic.
It could be done in multiple runs that are triggered by different records. It could be done in a regular scripting app that doesn’t have time limits.
On the other hand, I may have misread the question. If you have an automation script that affects a single record, then paste in 5000 records in the user interface that is a totally different situation. Each record would trigger the automation on its own, so each run would affect only the triggered record. That should be fine from an automations point of view, except that if you do this on a regular basis you will quickly run out of automations. I also think there are limits on how many records you can paste in. For that many records, you might have to import them via csv.