The noun phrase in question is certainly convoluted. O. Henry liked using fancy language.
- the precariousness of the profession of heir presumptive
Note that it's actually three noun phrases; the second one is the object of the first preposition of.
- the profession of heir presumptive
And the third one is the object of the second preposition of.
Starting from the bottom, heir presumptive is a fixed phrase. It means 'the person who is presumed to be the heir', which can mean the next Duke, the future owner of the company, or the person who will succeed some other person in an important role. The presumption comes about because nothing about inheritance is certain until someone dies, and even then it's often complicated, so one can only presume.
Moving up to the second noun phrase, we note that heir presumptive is not a profession, so this is figurative language. It refers to the waiting that an heir presumptive must endure before inheriting. Whatever that entails.
Finally, precariousness is predicated. You're right about the meaning of precarious, but precariousness is an abstract noun meaning 'the state of being precarious'.
So tell the audience that being an heir apparent is a very precarious situation to find oneself in.