I already get this problem to do real time soft robotics simulation on SOFA framework.
I've made some git repository to store and share the code to do so (both contain the same code) :
https://github.com/pchaillo/MeshPipeline/tree/main
https://framagit.org/pchaillo/stl2vtk
Feel free to give a look if it may help you for your conversions !