Can OS become slower by installing and uninstalling an app multiple times? Can this process make any harm to system, or is it safe to do it?
No, it is totally fine. If you think your phone is slow clean the junk files or the cache using some good app like clean master and after cleaning everything uninstall it so that it doesn't run in background. Install it again when you think your phone has become slow and uninstall it again. Best way is keep a backup of the app so that you don't need to download it again and again.