The Pledge of Allegiance was written by Francis Bellamy, a socialist Christian minister, in 1892 and that year the pledge was first recited in American schools. The original salute to the flag was the same as the Nazi salute to Hitler. Congress passed a law in 1942 changing it to the current hand over the heart position.
The nature of such a pledge is to reinforce a loyalty of “my nation, right or wrong”. The original pledge did not include the “under God” clause. That was added by Congress in the 1950s. The original pledge was patterned after similar pledges found in the Prussian republic which later became Germany. The Prussian model of education, was designed to produce obedient soldiers for the military, obedient workers for the factory, uniformity in thought, word and deed, and unquestioning loyalty to government actions and policy believing that those officials knew best, and acted in the best interests of the people. The repetition of a pledge of allegiance to a nation is the same as pledging allegiance to a government. This is all fine and necessary for an authoritarian state. However, it is unsuited to a nation founded in liberty.
If liberty were to disappear from a nation, many would still pledge allegiance to it from sheer patterned reflex.
If we must have a pledge please consider one like this. Consider that no one is worthy of true allegiance except God, Himself. All others may receive our conditioned support.
I pledge allegiance to God, the author of liberty. I pledge my support to individuals and nations who walk in it. I pledge to walk in love with my fellow residents by supporting their liberty. Liberty is love. With Thomas Jefferson, I pledge upon the altar of God, eternal hostility against every form of tyranny over the minds and bodies of my fellow residents. If my nation, state and community honors and supports true and full liberty I will pledge my support.