I see no safety reason an inline switch would not work. Many vintage and all newer machines have an on/off switch which is just a machine mounted inline switch. So as long as it was wired correctly, ( switching on the hot side ) there should be no problems.
Joe