Very good idea ! I've done this serval time , when I found a worm in my garden I am systematically transferring him in a pot , can be cannabis, lime , tomatoes, whatever have roots. And recently I've done some grass compost and I've found a lot of worms inside , their are making underground galleries for a better soil aeration, their are pooping in the soil so enriching , everything they are doing is great. Now they are not really friends with heavy mineral feeding.