I saw this as an example of an adult who regretted a bad decision he made in his youth and is warning his child of making the same mistake; which I find to be a legitimate point made.
That is a legitimate point. That's also not a whataboutism. The whataboutism in that example was when the son retorts with
“But you did them, so your protests can’t be true.” the counter accusation is the whataboutism
I remember as a kid I was told sex out of wedlock was a sin. I thought of a whataboutism being; my great- great-great grandfather was a slave thus was not allowed to get married. Does this mean my ancestors were sinners because the crooked laws of the land did not allow them to marry?
This isn't really a whataboutism; it's questioning an issue and raising a valid counter argument. For a whataboutism to take place, there needs to be a counter accusation that attempts to deflect an accusation that then attempts to change the focus of the conversation. The counter argument here doesn't do that. The topic is still focused on wedlock an whether or not it is sinful
I remember being told to never lie, to always be truthful. But suppose the year is 1940 in Nazi Germany and the Gestapo knocks on your door asking if you have any Jews in the house for them to take away, and you know you have a family hiding in your attic. Sometimes lying is the right thing to do.
Again, this is not a whataboutism but is a valid counter argument. If you notice, you yourself say "sometimes" as you are giving credence to the initial sentiment that lies are bad. You would need a counter accusation for this to be a whataboutism that dismissed the initial statement. Instead, the focus is still on lies and whether or not they are sinful
In these examples, whataboutisms expose the flaw of using broad sweeping statements concerning issues. I find this perfectly reasonable.
Those examples are not whataboutisms. I recommend reading the article I sent earlier as it goes into more detail of exactly what a whataboutism is and why it's not logical