Would answering "Jawohl" to an order or request be associated with Nazi Germany?
What about "Jawohl, mein Kommandant"? Can it be used (jokingly) without people finding it tasteless?
"Jawohl" is a normal German word, used as a strong affirmative. It doesn't have a specifically Nazi background, but one of its main uses has always been in the military, including the Wehrmacht.
Google NGram shows it has been in use during all times since 1800.
I'd say that its use in daily conversation, however, has declined. It has a slightly outdated touch to it in many contexts. Still, this is a valid example:
The Wiktionary link (below) and the Google Book links in the NGram have more examples of the word's use throughout the ages.
In the military, as far as I know, it is the standard affirmative answer to a superior's command in the German military to this day — it made the transition from the Wehrmacht to today's Bundeswehr. Its closest English-language equivalent in that sense is "Aye!" or "Yessir!". It often gets colloquialized into "Jawoll".
I think the idea of a Nazi connotation has a simple explanation: Most plays, novels, films, and stories that deal with the German military are set in the Third Reich. You will hear "Jawoll!" in every one of them at least once.
Also, the phrase "Jawoll, mein Führer!" is still widely used in a sarcastic way, both in the English-speaking world and in Germany (and probably everywhere else around the globe).
I wouldn't say it carries the "N-word" with it but it definitely has a military connotation to it. It is sometimes used ironically or tongue in cheek, like e.g.:
"Jawohl" is the more formal version of "Ja" used very commonly in the Bundeswehr without any connotation. It is also used as shorter version for "zu Befehl" (as you order / at your command) when accepting an order, which is rarely used nowadays.
Some examples in military context can be found here. As Germany has had general conscription for quite a while, it can stil be found in civilian life.
"Jawohl" in General
Answering "Jawohl" in an everyday conversation with Otto Normalverbraucher would probably seem awkward, but not because of associations with Nazi Germany but because of its formal / militaristic connotations.
Jawohl, mein Kommandant!
"Jawohl, mein/Herr/Frau Kommandant" could be used in a joking way though there is no guarantee everyone would get the joke. It really depends on the person(s) you are talking to.
Jawohl, mein Führer!
Answering "Jawohl, mein Führer" would, with higher probability, be taken as irony or sarcasm by pretty much everyone because it is so obviously exaggerated. It works best in response to something you do not really want to do, as well as to a request which was made in a particularly harsh or otherwise unacceptable way. Which means there is probably a not exactly friendly atmosphere even before your remark.
If this situation is between you and a person you generally get along with, this response might actually losen things up. Then again it might backfire on you, but that would have nothing to do with the obvious Nazi connotation, but with you being flippant.
Jawohl, Herr Kaleun!
With regards to what you seem to be contemplating, how to use "Jawohl" so people get that it's used in exaggeration, as a friendly joke, you might try answering "Jawohl Herr Kaleun" (Kaleun = Kapitänleutnant, equivalent to e.g. a US Navy Lieutenant). This would be an obvious reference to the movie "Das Boot" and with high probability be received in a friendly way by most German people between, I guess, 25 and 50.
Though you should watch the movie or at least a suitable excerpt first, to get the intonation of that quote right. It's said in a rather sharp and snappy way, nearly shouted but not quite.
How To Really Screw Up
Oh and if you really wanted to get people mad, make references to the SA / SS, like in "Jawohl, Herr Obersturmbannführer". But never use that as a joke. Really. Never. Ever.
I live in the south and I have never heard anyone say "Jawohl", except jokingly or to express uncommonly strong affirmation. It is more common in the north east, though (around Berlin).
I would never say "Jawohl, mein Kommandant" to people I don't know well, it feels like a quote from an American movie with fake Nazis.
As an American who lived in Germany (because I come from an Air Force background, but actually attended a small, local German school) I can affirm that saying "jawohl" does not carry any Nazi associations whatsoever. The word is simply a strong affirmative statement, close to when you hear what a friend is saying and say "yeah!" quickly in agreement. It is frequently used by uniformed personnel, but it is certainly not limited to them whatsoever.
We used to speak German in the military back in the days. Now we speak our own Danish language, with some extra military/global words and expressions. To a superior we respond by saying: “Javel Hr. Sergent” which means “Jawohl mein Kommandant”.
Jawohl is still used, in many of the European armys.