"That is mostly correct. You are correct to say that layering genjutsu would require the user to place the stronger illusion on top or as the first technique as opposed to the weaker ones. That is because in the opposite, the weaker genjutsu would be overridden the moment the stronger illusion was placed on top.
Now, you are only partially correct in saying that one will fall into the second illusion once they release one illusion. However this isn't always the case. If the victim uses the required amount of stimulus to release themselves from the strongest ranked genjutsu, then they will inevitably release themselves from the weaker one as well. For example, if two genjutsu; an A-ranked and a B-ranked are layered upon one another and the victim causes themselves pain, equivalent to releasing an A-ranked illusion then both layers will be rendered. However if they only use pain enough to release themselves only from the B-ranked, they'll still find themselves trapped in the spell of the A-ranked.
Another important fact about genjutsu layering is that you must make sure the effects of the genjutsu are harmonious or, at the very least, they do not contradict each other. For example; you can't cast an illusion of your opponent experiencing hellish torture and heavenly sanctuary. For one it would cause a contradiction in the way the victim's mind would perceive the stimuli. Are they in pain or are they in bliss? If you cast two illusions that contradict each other; either the stronger will come out on top or they would both cancel each other out and you've wasted your chakra needlessly. Any questions?"