The calls that you need to do in order to achieve the described deletion are nearly the same for all kinds of objects. However, it won't be trivial as you'd still need to specify the object types that should get checked and deleted. If you, for example, just want to check rules, hosts, networks, services this could be done quiet easily. I'd recommend the official Check Point Python SDK package in order to do this as it contains lots of prewritten functions that help you even more. For example, there is one function ("api_query"), that automatically checks all existing objects if more than the default value matches. Therefore you would not need to care regarding the overall return sum etc.
If you are not familiar with python yet you can also take a look at the pre written scripts, that are also placed in the same repository and adjust them for your needs. As far as I remember the script documentation is quite nice, so that you should get the meaning behind each line at ease.