E.B.
I suggest, since this does not seem to be any form of self-harm, that you stop googling into the night, and stop reacting when your son calms or soothes himself.
You use words like "heart attack", "scared", "alarmed", and "desperate". Now, if there's anything a child would need to soothe himself over, it would seem that a mother who is with him 100% of the time, all day, every day, who is alarmed, desperate, scared and feels like she's having a mini-heart-attack, that would check all the boxes.
Now, re-read your sentence about your child, the one where you say he's happy, with no delays, active, etc. And re-read all the panicky, anxiety-filled words that you wrote to describe yourself.
Calm yourself. Your son is doing something a little unusual, but you are panicking. Stop trying to come up with a disease or disorder. Stop noticing or reacting if your son strokes his leg or feet. Stop being with him 100% of the day, all day, every day. Of course I don't mean to leave him or get babysitters, but make sure he has time to play by himself. Get him some age-appropriate Legos and don't sit down and build stuff with him. Take him to story time at the library and you browse a book while he's with the other kids.