I used to get what I called 'vagal attacks' but never as dramatic as yours. Just my heart suddenly beat irregularly and slowly, then 'stopped'. It was food related mostly. Had to climb stairs or jump up and down to restart.
It settled when I took a 6 month course of PPIs (omeprazole) - seemed to make the vagus nerve less sensitive. Not suggesting that it would work for you, but it was an off label suggestion by my then gynae, who was elderly, had vagus nerve problems and had self medicated with omeprazole!
Very scary, what you describe. Can you avoid wheat to see if that helps? I also take ground linseed to avoid straining