Obviously we know that people like Goebbels and Goering were found guilty due to their ranks in the government and by extension, their degrees of responsibility that ultimately cause the deaths of millions.
To try and be clearer, how high of a rank could I get with minimum risk (not no risk) of being charged with war crimes later?
Because I read a few articles here and there of some lucky few, despite having high power, got away scot-free or with minimal penalties.
The question is impossible to answer really. By and large people were indicted for the specific things that they did, not "war crimes". The original high ranking defendants were charged with "count 3" of "war crimes". (http://avalon.law.yale.edu/imt/count3.asp) but even then there was much specificity in the testimony.
But, to answer your question, Karl Doenitz, the head of the Nazi State, was acquitted (rightfully, in my opinion) of "war crimes".
He was found guilty of "crimes against peace" for waging unrestricted submarine warfare, which is BS in my opinion, and also found guilty of count 1 "the common plan or conspiracy" which was utterly absurd considering he was a nobody prior to the outbreak of war.