Swearing & oath are both words with problematic multiple meanings in English
The Oxford English Dictionary gives, as just 2 among many definitions of oath:
A solemn or formal declaration invoking God (or a god, or other object of reverence) as witness to the truth of a statement
A casual or careless appeal invoking God (or something sacred) in asseveration or imprecation, without intent of reverence, made in corroboration of a statement, declaration, etc.; a profane or blasphemous utterance; a curse.
And as definitions of swear:
To imprecate evil upon by an oath; to address with profane imprecation; to utter maledictions against; to curse
To promise or undertake something by an oath; to take an oath by way of a solemn promise or undertaking.
So, quite apart from the politics, it is not surprising that the suggestion that all schoolchildren should take some kind of oath of allegiance to the Crown has provoked a storm
The question of whether or not to require someone to take an oath, to whom & in order to earn which privilege has a long history of causing problems in politics, the law, even education, in England. And still does, even without a new one. Hence the spectacle of the late Tony Banks with his fingers crossed behind his back when being sworn in as an MP, or Sinn Feins refusal to take their Parliamentary seats
In the 19th century the taking, or not, of an oath was used to exclude Catholics, Jews, Atheists or Dissenters from Parliament, Oxbridge, & could even lead to a charge of contempt of court
That said, there is much in favour of some kind of ceremony. I always felt special, reciting my Brownie, then Girl Guide, Promise.
So perhaps what we need is the equivalent; just find words that mean a personal declaration or promise