Welcome to "Using English."
The "after having given" is fine, but you could also say "after giving" (or a few other structures) with no difference in meaning.
The "as witness for instance ins the sequence of" is a bigger problem. Why so wordy?
... from its elliptical structure, such as when the protagonist tries to contact his friend after having given/after he had given/after giving/after he gave her number..."
Interested in Language