There’s no such thing a “locally violating the second law of thermodynamics. Work is not a violation of the second law.