Yes, this is possible, but you need to overwrite the Listing Image template part using the child theme and add logic there, extracting the category image and showing the following instead of the listing image, you can check this doc: How to override template parts - HivePress Help Center
I have checked references and I still not find any doc/class/references related with the detail information about different methods, is there any concrete different to check?
Your snippet looks good, but I also recommend that you go through our documentation in more detail, especially on methods, please check this doc: Models | Developer Docs