I wouldn't recommend doing this sort of thing automatically. It will tell you which programs or files you haven't used for a while etc. If you want to check out and delete unnecessary programs, then click on the apple logo>about this mac>storage>manage>remove clutter. You can reset or clear the management controller too which is necessary sometimes if something like the sound stops working. If you want to clear RAM, then there's a key combination at start up (I think it varies with OS). This automatically runs the maintenance program and doing anything else is not recommended. If you want to run maintenance on cache and temporary files on a macOS, all you have to do is reboot the machine.