The present work proposes a comprehensive metaheuristic methodology for the development of a medical robot for the upper limb rehabilitation, which includes the topological optimization of the device, kinematic models (5 DOF), human–robot interface, control and experimental tests. This methodology applies two cutting-edge triads: (1) the three points of view in engineering design (client, designer and community) and (2) the triad formed by three pillars of Industry 4.0 (autonomous machines and systems, additive manufacturing and simulation of virtual environments). By applying the proposed procedure, a robotic mechanism was obtained with a reduction of more than 40% of its initial weight and a human–robot interface with three modes of operation and a biomechanically viable kinematic model for humans. The digital twin instance and its evaluation through therapeutic routines with and without disturbances was assessed; the average RMSEs obtained were 0.08 rad and 0.11 rad, respectively. The proposed methodology is applicable to any medical robot, providing a versatile and effective solution for optimizing the design and development of healthcare devices. It adopts an innovative and scalable approach to enhance their processes.