I am aware of several instances where something similar to this has happened--most of them private, a few of them public.
A comment I shared on the related post on the hermeneutics site may be worth sharing here as well--Jesus did on occasion call people to repentance more publicly (e.g. Matthew 23), but this appears to have been at least in part to protect innocent parties from sinful religious leaders. Much of His ministering was to "the one" and was done in private.
Church of Jesus Christ of Latter-day Saints perspective
I'll share 3 publicly known examples from The Church of Jesus Christ of Latter-day Saints. I found the links in DJClayworth's post insightful; unfortunately, I do not personally know of other examples representing other faiths on this question; I'll share examples from the history with which I am most familiar.
To my dear voters who anonymously down-vote nearly all of my Latter-day Saint-leaning posts, I would appreciate your insights as to why.
William McLellin in 1831
In 1831, William McLellin sought revelatory guidance from God through Joseph Smith, the founder of The Church of Jesus Christ of Latter-day Saints (Smith is accepted by the church as a prophet). McLellin had 5 private questions (he had discussed them privately with the Lord but they were unknown to Joseph Smith) to which he sought answers.
Joseph Smith inquired of the Lord and received answers to McLellin's questions (see here). Additionally, McLellin was called to repentance:
Verily I say unto you, my servant William, that you are clean, but not
all; repent, therefore, of those things which are not pleasing in my
sight, saith the Lord, for the Lord will show them unto you. (Doctrine
& Covenants 66:3)
...Commit not adultery—a temptation with which thou hast been
troubled. (Doctrine & Covenants 66:6)
Through Joseph Smith the Lord revealed "secrets of the heart" of William McLellin, including answers to his private questions and chastisement for his adulterous inclinations. McLellin (at this point in his life) accepted that Joseph Smith was speaking as a prophet and accepted the call the repentance.
Oliver Cowdery in 1829
"Secrets of the heart" need not always be a bad thing. Oliver Cowdery had a spiritual experience which led him to volunteer to support Joseph Smith in the translation of the Book of Mormon (Cowdery would go on to serve as scribe for most of the project); he had not made this experience known to anyone.
Cowdery later had doubts and Joseph Smith received the revelation known as Doctrine & Covenants 6, directed to Cowdery. Key passages:
15 Behold, thou knowest that thou hast inquired of me and I did
enlighten thy mind; and now I tell thee these things that thou mayest
know that thou hast been enlightened by the Spirit of truth;
16 Yea, I tell thee, that thou mayest know that there is none else
save God that knowest thy thoughts and the intents of thy heart.
17 I tell thee these things as a witness unto thee—that the words or
the work which thou hast been writing are true.
22 Verily, verily, I say unto you, if you desire a further witness,
cast your mind upon the night that you cried unto me in your heart,
that you might know concerning the truth of these things.
23 Did I not speak peace to your mind concerning the matter? What
greater witness can you have than from God?
24 And now, behold, you have received a witness; for if I have told
you things which no man knoweth have you not received a witness?
God revealed through Joseph Smith information that nobody but God & Oliver Cowdery knew--the details of an experience Cowdery had had in the past. In making known the secrets of Cowdery's heart (in this case, good secrets), Oliver's confidence grew and he gave his efforts to the work of translation.
Amulek & Alma and Zeezrom -- circa 82 BC
This is a classic story from the Book of Mormon (but may be unfamiliar to most here). I include it not because it is modern, but because it demonstrates that what Paul describes can and does happen (at least it does that for those who believe the Book of Mormon is a real, historical account--I do).
Amulek & Alma were missionaries, and Zeezrom was a lawyer who sought to trap them in their words. Among other things, Zeezrom offered Amulek a bribe to deny the existence of God.
Amulek's response to the bribe didn't mince words:
23 Now Amulek said: O thou child of hell, why tempt ye me? Knowest
thou that the righteous yieldeth to no such temptations?
24 Believest thou that there is no God? I say unto you, Nay, thou
knowest that there is a God, but thou lovest that lucre more than him.
25 And now thou hast lied before God unto me. Thou saidst unto
me—Behold these six onties, which are of great worth, I will give unto
thee—when thou hadst it in thy heart to retain them from me; and it
was only thy desire that I should deny the true and living God, that
thou mightest have cause to destroy me. And now behold, for this great
evil thou shalt have thy reward. (Alma 11:23-25)
Alma steps in and speaks to Zeezrom as well, further rattling Zeezrom that the missionaries are inside his head. The full story is available in chapters 11 & 12 here -- the key verse as it relates to the OP is:
7 Now when Alma had spoken these words, Zeezrom began to tremble more
exceedingly, for he was convinced more and more of the power of God;
and he was also convinced that Alma and Amulek had a knowledge of him,
for he was convinced that they knew the thoughts and intents of his
heart; for power was given unto them that they might know of these
things according to the spirit of prophecy. (Alma 12:7)
Zeezrom found out the hard way that God could reveal his thoughts to Alma & Amulek. Zeezrom went on (after sore affliction) to sincerely repent.
Why don't you share private examples?
I shared the 3 examples above because they are already publicly known. The most spiritual experiences of my life are sacred to me and I discuss them with care. Although I am aware of other instances where God has facilitated a person's repentance by revealing their thoughts to others, I do not believe the internet is the place to do them justice. I don't consider these things secret, rather, I consider them sacred.
I respect the example of Christ, who Himself asked that many of His miracles be kept private. I do not believe He used divine power to impress people; He used it to improve people's lives and eternity.
Don't try this at home unless the Spirit directs
The "if" in 1 Cor 14:24 is important--this method of preaching repentance is appropriate if the Spirit directs.
Joseph Smith taught the following in his discussion of leadership:
41 No power or influence can or ought to be maintained by virtue of
the priesthood, only by persuasion, by long-suffering, by gentleness
and meekness, and by love unfeigned;
42 By kindness, and pure knowledge, which shall greatly enlarge the
soul without hypocrisy, and without guile—
43 Reproving betimes with sharpness, when moved upon by the Holy
Ghost; and then showing forth afterwards an increase of love toward
him whom thou hast reproved, lest he esteem thee to be his enemy;
God's power is to be used without guile. If we are to "reprove with sharpness when moved upon by the Holy Ghost", that also says to me "don't reprove with sharpness unless moved upon by the Holy Ghost to do so."
In each of the examples I cited, God revealed privately known information to His servants, and in doing so led the recipients to greater faith & repentance.
My own observation is that this seldom happens in public. I believe God can and does do public miracles, but that most of His miraculous work happens privately, in the quiet places of the heart.