Mostly yes. But Roths are more flexible with respect to 1) recovering basis and 2) qualifying for exceptions to the 10% penalty.
Plus the fact that the expenses it typically funds happen further into the future allowing it greater capacity for tax-free compounding than what the 529 can offer.