ECG (Electro CardioGram) measures the electrical activity of the 4 chambers of your heart. It does not put any electricity into you; the machine only needs electricity to power the printer.
It is done to check your heart rate, rhythm etc. So, it is sometimes done when you reach a certain age eg 18 / 20 / 30 / 40 etc. If there are no issues, then you probably won't need another until your reach the next age milestone - or change clinics.
By the way, an ECG can show unusual features, which are not necessarily clinically significant - reading ECGs / screening does take considerable skill, which not all operators have, which is why they may not be able to give you the all clear immediately - they might have to refer to a more senior technician or a clinician.
I needed a general anaesthetic for an arthroscopy in January, and the anaesthetist referred me for an ECG, despite being under 50 years, because I have diabetes. Obviously, I couldn't prove to him that I'd had several ECGs over the years, usually done by colleagues who were learning how to do them!