The demand for safe and ergonomic workplaces is rapidly growing in modern industrial scenarios, especially for companies that intensely rely on Human-Robot Collaboration (HRC). This work focuses on optimizing the trajectory of the end-effector of a cobot arm in a collaborative industrial environment, ensuring the maximization of the operator's safety and ergonomics without sacrificing production efficiency requirements. Hence, a multi-objective optimization strategy for trajectory planning in a safe and ergonomic HRC is defined. This approach aims at finding the best trade-off between the total traversal time of the cobot's end-effector trajectory and ergonomics for the human worker, while respecting in the kinematic constraint of the optimization problem the ISO safety requirements through the well-known Speed and Separation Monitoring (SSM) methodology. Guaranteeing an ergonomic HRC means reducing musculoskeletal disorders linked to risky and highly repetitive activities. The three main phases of the proposed technique are described as follows. First, a manikin designed using a dedicated software is employed to evaluate the Rapid Upper Limb Assessment (RULA) ergonomic index in the working area. Next, a second-order cone programming problem is defined to represent a time-optimal safety compliant trajectory planning problem. Finally, the trajectory that ensures the best compromise between these two opposing goals-minimizing the task's traversal time and maintaining a high level of ergonomics for the human worker' is computed by defining and solving a multi-objective control problem. The method is tested on an experimental case study in reference to an assembly task and the obtained results are discussed, showing the effectiveness of the proposed approach. Note to Practitioners-Health and safety in workplaces are business imperatives, since they ensure not only a safe collaboration between industrial machinery and human operators, but also an increased productivity and flexibility of the entire industrial process. Hence, investing in health is a real driver for business growth. The key enabling technologies of Industry 4.0, such as collaborative robotics, exoskeletons, virtual and augmented reality, require standardization and indispensable technical safety requirements that cannot ignore physical, sensory, and psychological peculiarities of the human worker and aspects like usability and acceptability of these technologies in performing their activities. Against this ongoing industrial challenge, the aim of this paper is to provide researchers and practitioners with an innovative HRC trajectory planning methodology focused on enhancing production efficiency while respecting the SSM ISO safety requirement and guaranteeing the ergonomic optimal position of the operator during an assembly task. Therefore, the proposed methodology can be a convenient solution to be deployed in industrial companies, since it can support human operators by drastically reducing work-related musculoskeletal disorders and augmenting their performance in the working environment.