The dowels are usually better; more natural. But 2x4s are usually cheaper and easier to build with. Also depending on how cold your winters get, the 2x4s are good because then the chickens can cover their feet when roosting.
I use those kind of perches, too, although I give the branch a good spray with Adam's Flea and Tick spray and put it out in the sun to dry before I use them. Natural tree branches can occasionally harbor mites from wild birds.
When the branch gets poopy, I just throw it out and get a new one. I like not having to clean perches!
While chickens certainly can wrap their toes around something, they do not *grip* it like normal perching birds do (finches, parrots, whatever).
I notice that the original poster is in Maine. Thus, cold winters. It is fairly important that whatever you use it result in your chickens' toes being flat enough that they can easily cover them fully with their tummy feathers, vs frostbite. So IMO your choice is between the flat (wide) side of a 2x4, or a fairly large-diameter tree branch (or other round thing), like maybe 5" in diameter, ish.