Your issue is indeed weird, deleting an agent from "agent managed" should remove every other related object (sometime after a couple of days)... Something may have gone wrong at some point but I guess it's too late to have a look at your logs.
Removing orphaned objects is indeed unsupported if not done under Microsoft's support guidance, so you could call them.
Otherwise, if you finally decide to give it a try by yourself, this is the only recommended way : https://kevinholman.com/2018/05/03/deleting-and-purging-data-from-the-scom-database/