Regarding anarchism, it's known that the reason it didn't work out in the attempts so far has not been an inherent flaw in the system, but external ingerence.
In the two cases that are most known to the public, i.e. anarchist Catalogna and Free territories of Ukraine, the reason why the revolution finally failed has been in both cases the intervention of Soviet Russia, that in the first case supported an antagonist faction (i.e. communists front in the Spanish Civil War) and in the second case it invaded the free territories.
I think in general it's not possible to disregard some ideologies on the basis that they never managed to be implemented, without looking at the context. In today's world, which is dominated by capital, it would be even harder to establish a non-capitalist society, but that doesn't mean that such a society would be less fair, free or just than capitalism.
Two reasons why hierarchical structures show up:
1. If you want to even have someone looking at the "big picture", due to limits of human cognition, you have to build a hierarchy.
2. Hierarchy shows up as a natural solution to coordination problems. Consider e.g. various forms of the tragedy of commons. The solution to that[0] is that all actors involved agree to be governed by an independent one. This is something that humans end up rediscovering all the time.
Basically, hierarchical governance is what lets humanity build societies larger than couple dozen people.
--
[0] - in larger systems, i.e. beyond few people who know each other personally and can mutually agree not to be assholes to one another; we have a strongly developed social skills to handle such issues in small groups.
(A part of) the world already did some good progress on this front with the gradual switch from absolute monarchies to democracies, and I hope it will eventually be able to continue on the path towards a more just world.
Thats easy, with a bit of surgery ...