First, if your phone is giving this message, you have too much on it.
If it is apps, ditch some.
If it is photos and videos, put them onto an SD card.
If you have any social media apps (these tend to be large) xitch them and use your browser for them instead.
This is actually a good idea for amy app that you can use a site for instead.
The files you were deleting with the other device are most likely app caches and log files.
Neither are important.
Most people here wl tell you to stay away from cleaning apps, and I would do the same most of the time.
But there is one that could replicate the actions that you had with your previous device.
https://f-droid.org/en/packages/theredspy15.ltecleanerfoss/
When you run it, select just to scan, not clean, so that you can double check what it wants to delete.
Be sure to double check all of the settings, and engage the built in whitelist.
Also, you will need to find out the filepath for any files/folders that come up in the scanning that you do not want cleared, and add them to your whitelist.
It won't delete things important to the device, but you just want to double check to make sure none of your personal files are included in the list.
If they are, then put the filepath into the whitelist.