Yes, you got it absolutely right!
You can use "bejesus" to replace "shit" or other expletives in English, to be a little more polite but still convey a (milder) form of the original sentence:
"You scared the shit out of me" --> "You scared the bejesus out of me."
"He beat the shit/crap out of John" --> "He beat the bejesus out of John."
"Holy shit, he nearly ran over me" --> "Bejesus, he nearly ran over me!"
In other words, I think anywhere you can say "the shit/crap out of ...," you can also replace it with the milder expletive "the bejesus out of ..."