how do I detect and remove fileless malware?

Hi, my wife’s ex bf is constantly hacking her mobile phone, Window PC and Macbook.

We’ve been searching to solve this problem and heard that some hacking tools can get to the system and edit the registry…that even factory resetting is no use.

In that case, how could we detect those malware and remove them? (all from her android phone, windows PC, and Macbook)

While I was searching, I’ve read posts like “flash a custom ROM” “download stock ROM” in case of the android phone. I wonder what about the other devices then…? What should we do for Macbook and Windows PC?

Is there a program to actually detect and remove those kinds(memory resident, fileless) of malwares?

We’ve been struggling for so long time, I really hope we could get some answers

Thank you for reading!