I figured out something that made escaping or passing troll more easily.
So usually you take the time to places down blocks to stop a cave troll from getting to you. Well it’s still pretty true. But for me, I wait for the troll to go back. Then I run as close I can to the troll and place a wooden door and extra blocks if necessary.
This strat lets me run in and out of a cave troll’s area without them being able to stop me.
I also place a wooden door on the other side. So I run in, steal an item and run back out. A lot of the time the troll has no time to respond. The only reason I got hit was because I went in to break a block to flatten the ground.
I believe this method will make a good holding cell if I decide to come back and tame the trolls. I found thre cave troll, in a single cave and have trapped them all.