Most "cleaning apps" are junk, pure and simple. And I'd especially avoid "Clean Master" or anything else from Cheetah Mobile: they barely bother to hide the fact that they make their money by stealing data from their users' devices and selling it to spammers, and have frequently resorted to dodgy advertising companies to download their software onto devices that visit certain websites without even asking the owner's permission. Scummy company who should be avoided at all costs.
OK, now I've got that off my chest...
If you feel you need a cleaner app I'd suggest SD Maid. But use with care and always check what it's suggesting you can delete and think about it before going ahead: the app will be using simple rules to identify stuff that it thinks you don't need, and it may propose to delete stuff you don't want it to. Personally I don't use one at all, but SD Maid has the merit that it doesn't include any other junk like "RAM boosters", "Battery boosters", "performance optimisers" or any of the other euphemisms for task killers (none of which are needed or useful).
That said, these apps shouldn't be able to permanently break your phone, since unless you have root they should not be able to do anything that can't be undone by a factory reset.
On to the actual question: once it's in the boot animation you can do nothing at all except force the phone to shut down or restart. Unfortunately you can't use fastboot to reboot into safe mode either. There is a hack that can be done using ADB (USB debugging), but unless you have a custom recovery you need to be booted into Android to use ADB, so that won't help you. Your only real option is to reboot the phone and then hold down whichever button combination gives you safe mode. However, if you are in an actual bootloop I doubt that will work: the usual cause for a bootloop on an unrooted phone is that some data have been corrupted to the point where the phone cannot boot, and disabling user-installed apps (which is all that safe mode does) won't help with that. So basically if the button combination for safe mode won't work you probably have no choice but to reset (either through recovery or fastboot). The best I can do is suggest trying wiping the system cache before going all the way to a reset, but I think you'd be lucky if that works.