Turning it off is easy - pull he battery. Turning it on again? You have to short the 2 pins of the power switch, there's no other way. (The normal way is by pressing the power button. You could solder 2 tiny wires to the points and put a push-button switch on them, but if you could do that, a new switch and button is under $10, and not much more work to replace it.
Your best bet is to bring it to a good local repair shop and have them replace the switch. (It's going to cost more than $10 - even if they have an almost-destroyed S5 so the switch doesn't cost anything. The labor is more than $10.)
05-28-2015 03:54 PM