Purging and Archiving requirements should be discussed with business and it will be govern by your audit and compliance requirements. having 5 millions records is not an issue, if you see legacy claims applications they will have tons of millions of records and database will be able to support that very well.
There are few clients who have moved some data to archival DB/tables so the business can see limited data in review harness.
I'm not an expert, but I can offer some general guidance:
It's a balance of performance and disk space.
I assume that most of your millions of work objects are inactive ones and only a small percentage of them are currently being worked.
If you've got plenty of disk space for those millions of records, and they are sufficiently backed up to protect you in case you lose them, and your particular db is exhibiting good performance even though there are millions of unused work objects, then no purge/archive is needed.
However, if those millions are slowing down the performance, then that would be one reason to consider purge/archive.
Or, if performance is ok but your disk space is getting low, again, consider purge/archive.
Another consideration is whether you need to search those millions for reference. If you've used the Pega indexing feature, I don't know whether the index is usable for search even though the underlying work objects have been purged and archived. They definitely would no longer be searchable if you rebuilt the index after purge/archive.
If you do set this up, you have the option of running the process from scripts. I've seen it mentioned that Purge/Archive scheduling with Pega Agent is not recommended for any "backlog" over 100,000 records - especially if the work cases have children who might have children. Then, once you're caught up, you can either use the scripts on a schedule or configure the Purge/Archive in Pega as "maintenance" on a manageable number of work cases weekly or how ever often you have it run.
Are all the work objects in the same work pool (single table)?