The amount of stimulants you have taken is not a high amount, I honestly wouldn't stress much about that. 10mg of ritalin is a very low dose and caffeine together with it won't damage your heart. It would be very unlikely to at least.
Everyone is different, but I often take dexamphetamine the same day I take methamphetamine and will drink energy drinks on Dexamphetamine too, as well as drink coffee. I'm on 30mg dexamphetamine per day.
You may be very, very sensitive to stimulant medication. Some people are. A friend of mine needs 100mg dexamphetamine per day for ADHD. That amount of medication would keep me awake for a day. Not her. For you 5ng and NO caffeine would be better, I'd think. Or none at all.
The most methamphetamine I've used in a single session has been 1 gram, and I often use half a gram per night. I don't recommend this at all and it's the reason for my break from the drug as I need to stop entirely or at the very least reduce my tolerance, but I'm yet to experience any heart issues and I've used meth on and off for decent periods over 7 years (probably around 3 years all up using, with some slips here and there in between). I'm saying this to explain that your current dose really isn't anything to medically be concerned about as people have, do, and will take much higher doses of much more powerful stimulants without many if any heart concerns.
Of course, some people do experience heart issues on stimulants but that often happens following years of heavy, habitual use. Your level of useage is a prescribed amount even with the caffeine.
I honestly think you have some anxiety surrounding this and it's being made worse by the ritalin as it can exacerbate anxiety in some people. It's not the smoothest or least agitating stimulant on the market and people often stop taking it (as I did) for precisely this reason.
Anxiety can mimic heart issues, so what I do think is happening is that the ritalin is causing you to experience severe anxiety, which is being compounded by the effects of the stimulants and your lack of knowledge around stimulant medication and substances. As in, the fact that you believe that you've been taking 'insane' doses of stimulants indicates to me that you have little knowledge of average dosing for these substances and you are experiencing added anxiety because you believe that you've been taking an absurd amount of stimulants which could damage your heart. I assure you that you have not, and you are not. You are on a low therapeutic dose of a prescribed drug, and even with the caffeine you're nowhere near a dangerous threshold.
If you posted saying that you've been using a gram of meth a day for 10 years and wrote about the same issue, then I would be getting concerned about the health risks. Please trust me that you are not on a high dose, it isn't just a regular dose, it's actually very low. It's contributing to your anxiety.
As I said in your other thread I think it is well past time for you to stop taking ritalin as it clearly is causing you far more negative side effects than any benefits.
As far as your questions about anti-psychotic medication goes you will have to explain which medications you have been on for me to pass comment on that. I've been on some which were useful, others which were decidedly not so. They can be very hit and miss and for people who are on the wrong one for a long time the ongoing effects can be very bothersome.
In saying all this, if you do continue to believe that you have heart issues from this (which again, I stress, is very unlikely on such a low dose together with something as mild as caffeine) then please have some tests done. It will give you an answer either way which we cannot definitively provide. It may ease your panic.
Lastly, it is recommended not to mix prescription stimulants with caffeine due to the higher chance of exacerbating the unpleasant side effects which naturally occur with these medications. It's not strictly speaking dangerous, but I would hazard a guess it's contributed to your situation.