It did not work out because the binding ideology wasn't pan-slavism, but rather bad mix of communism and socialism.
Also, instead of returning to our root slavic religion, we got atheism. Without any form of religion, people can not feel that deep bond. Especially Slavic people, who are naturaly very religious.
Yugoslavia was a mistake, but not for reasons you might think.
I'm pretty sure that "returning to the root Slavic religion" would involve offering massive cow sacrifices to the thunder god Perun in exchange for long life and prosperity. Not sure if that's what you had in mind, though!
There were decentralized Christian-like religions like Bogomils (Cathars in Western Europe) in south Slavic parts before modern centralized religions. Maybe those would work better with Slavs who seem to not organize well around centralized sources of power.
You can colour it any way that you like. Many Americans would likely baulk at the idea of a turkey-less Thanksgiving. It is a central theme of the holiday. What else is it, if not a sacrifice?
Yugoslavia pre-1945 had nothing to do with communism and socialism - it was created explicitly as a pan-South Slavic state. It ended up being dominated by Serbia, though.