I know all of this already, but her relation to the Fujiwara ends with their clans hating each due to the coup, and then ZUN worked in that lightning strike as inspiration for her power. She's still based on Tojiko no Iratsume, who was a member of the Soga clan married to Prince Shoutoko, who is Toyosatomimi no Miko in Touhou.