Is there a Python script for gathering all level assets (incl. materials/meshes/blueprints etc)

I have not tried it myself but you can take a look at this post: Capture all asset references - Editor Scripting - Unreal Engine Forums

I think you can use this to try to replicate what the built-in Reference Viewer does. I would try passing in your map asset as the ‘root’ object. Then, recursively call getDep() on the return list to get their dependencies. You’ll need to choose how many levels deep to go. Once you have this master list of referenced assets in the map, then iterate all assets like in DeleteUnusedAssets.py. If it is not in the master list, then delete.