The machines aren’t making his heart beat, hearts just beat. They will beat on a tray waiting to be transplanted, heart cells will beat in a Petri dish.
The machines are pushing air into his lungs and forcing oxygen around his body, hearts need oxygen like other body parts so without oxygen for some minutes the heart will stop.
However, other things can make a heart stop, as well as just lack of breathing. Abnormal heart rhythms are one, Archie is at risk of this because his body salts are tricky to manage because of his large fluid losses.
Large fluid losses is another, either blood or, with Archie, from the high volume urine loss that would happen when his medication was stopped. The heart would beat faster to try to compensate but eventually just fail due to the lack of circulating blood volume.
Sepsis does something similar, by lowering blood pressure and slowing the heart from toxins.
Anything that affects the lungs and this oxygen to the organs, a severe pneumonia could kill him, both from the sepsis affect and the damage to the lungs.