ML immediately tilts your decision towards Python as the ML ecosystem is in Python. Microservices can be programmed in Python. However, as you said, Python is slower than Node.js. This leads to a combination of both languages as the ideal solution. A problem in terms of skills, especially for a limited size team. It also raises the question of how you are going to connect the different microservices. If it is Kafka or MTMQ should not be a problem to connect services in the different languages. If you are limited in terms of size of team, choose Python. As you cannot go very far with Node.js for ML.