I don’t hire for the government. But I do hire in tech. I would never see this - we don’t even ask for transcripts; the background check company just verifies that people who get an offer have the degree(s) and prior job(s) they said they had, and all we get is “OK, they’re good to go!”
Even if I somehow found out about this after we’d give an offer to a candidate (or, frankly, before)…I can’t imagine why I would care about this, assuming it was consensual. While certainly inappropriate, I’d assume it was a youthful indiscretion. I did some silly things in college, too.
“Btw if I do write honestly about what happened, and what I have done after learning from the incident, and that I show my regrets in the actions I committed, do you think that could help put weight in my application in my favor?”
Yes. This is really going to be dependent on how you write about the incident. I have a PhD, and were I hiring a graduate student, I’m not sure this would make a difference to me (especially if the candidate is an outstanding one otherwise). It might to some other professors or admissions committees. There’s really no way to tell, but I agree with others that you should work with trusted advisors to craft the statement if/when you have to answer this question.