I want to be able to do the following:
1) clean-up users that never logged into Jira
2) clean-up users that never logged into Confluence
Looking forward on the reply.
I would suggest to look into add-ons that does this specific Job.
This add-on will help you to search for inactive users and then deactivate it.
There is also automation and you can specify the options for when it should run.
You can also explore the marketplace and check on the add-ons that would suit your needs.