I have/had kind of the same thing going on. But before you only look at mag, you should more focus on copper, since it regulates mag. EMF and stress can deplete mag, so better fix that too.
Regarding the mag itself, I also consumed plenty of dark chocolate for several month, practically every day, but small portions. I craved it a lot. Staying a lot on the computer, EMF and also having past stress, I´m certain my mag was super low. I had tried different mag supplements, like malate and citrate, was pointless. So i went for the chocolate, but now I can´t stand it. Some weeks ago I tried again just one piece, and I had to vomit. Just recently I tried ceremonial chocolate, the real deal, but I was not attracted at all and it did not taste well, my senses said no. So I assume my mag reserves went up. Chocolate, after some time, also gave me headache, that was another reason why I stopped. Certainly it was the caffeine.
The best mag animal source are mollusks. The cheapest option here would be mussels, most shops sell it frozen which makes them even cheaper. Clams are the highest source, as far as I know. Octopus, squid, cuttlefish are within the mollusca family. There are other animal products that contain mag, for ex dairy and eggs, among meat, but nothing beats mollusks
The best plant based sources, as far as I researched and experimented with, are:
cacao (dark chocolate), since 100 percent dark chocolate contains a lot of fat, just the powder would be better, but it´s so high in oxalates, I wouldn´t do it.
pumpkin seed oil and pumpkins itself. In the oil there are a lot of pressed seeds, so that would be a good source (aside of animal products of course). At one point I was consuming it quite frequently, with no side effects. Yes, it´s a PUFA, but it´s low in oxalate (the seed)
Coffee has apparently the highest amount of mag, maybe thats why people use it for constipation a lot. I was consuming a cup a day, but it was too strong and after some time I couldn´t handle it anymore. Now I bought decaf and I will experiment with that. Since there are different types of methods to remove the caffeine, i went for the least harmful, which is CO2. Will try my first cup tomorrow, i´m pretty curious, since I found a lot of benefits from coffee, but I couldn´t digest it, even if it was a very mild one.
But one thing I would be careful is your chocolate consumption. 100g, so a whole bar or more, is quite a lot mate. That´s a lof of oxalic acid and caffeine. You better consume some calcium with that to bind the crystals. I would focus on copper if I were u, beside changing your mag source. Oysters would also be an excellent choice for several nutrients. Eat a couple every week, and you might fix your problem fast