Local master equations are a widespread tool to model open quantum systems, especially in the context of many-body systems. These equations, however, are believed to lead to thermodynamic anomalies and violation of the laws of thermodynamics. In contrast, here we rigorously prove that local master equations are consistent with thermodynamics and its laws without resorting to a microscopic model, as done in previous works. In particular, we consider a quantum system in contact with multiple baths and identify the relevant contributions to the total energy, heat currents, and entropy production rate. We show that the second law of thermodynamics holds when one considers the proper expression we derive for the heat currents. We confirm the results for the quantum heat currents by using a heuristic argument that connects the quantum probability currents with the energy currents, using an analogous approach as in classical stochastic thermodynamics. We finally use our results to investigate the thermodynamic properties of a set of quantum rotors operating as thermal devices and show that a suitable design of three rotors can work as an absorption refrigerator or a thermal rectifier. For the machines considered here, we also perform an optimization of the system parameters using an algorithm of reinforcement learning.