An electrocardiogram is a safe procedure. You'll have no risk of getting an electrical shock during the test because the electrodes placed on your body don't emit electricity. They only record the electrical activity of your heart.
You may have minor discomfort, similar to removing a bandage, when the electrodes are removed. Rarely, a reaction to the electrode adhesive may cause redness or swelling where the patches were placed.
A stress test may lead to irregular heart rhythms and, rarely, a heart attack. These effects are brought on by the exercise or medication, not the ECG itself.
A Holter monitor may cause some skin irritation if you don't move the electrodes each day.
An implantable loop recorder has a slight risk of infection because it involves a minor surgical procedure. And some people may experience a reaction to the device that causes inflammation.