A lot depends on the context.
if it was something like an event from a drama society / WW II re-enaction and ) you can trust everyone there (who might end up at the event) not to take offence you might get away with it but would still have to be careful in the current climate. It would be exactly the same as if you wrapped tea towel around your head and pretended to be a jihadi “for a laugh”.
Places like colleges or communities who like comics/games might be a bit on top as they are all watched big time now for extremism (stereotypes about “lone attackers” etc)
Someone did just that at a works do in South Essex (he was a nurse/healthcare assistant), got hauled up to Court and struck off (he had also done a load of other bad stuff as well including bullying coleagues)
A friend of mine who isn’t in the slightest racist and in fact comes from a European country that got invaded did also actually dress up as Hitler at a free party in SE England 10 years ago (his mate was dressed up as Winston Churchill š ) – of course as all of us knew they were doing and there was a trend at the time of turning up in bizzare fancy dress to these events that there wasn’t a crime committed but when the cops arrived they said to them they had to remove any obvious military type unitorms or insignia when outside the building or they could have got in trouble.
There are some ancient laws against wearing realistic military uniforms (of any kind) in public in the UK which can be invoked in times when the govt is paranoid about public disorder or terrorist attacks – unfortunately these times are back with us again.
Auch wenn du am Abgrund stehst, und gar nichts mehr verstehst,
wachen Engel über dich, halten dich im Licht und lassen dich nie fallen.