This resource is entirely renewable. You have crapton of ways to get mech parts. Raids sometimes bring hacked mechanoids, mechanoids raid you themselves, you can actually self-initiate a mechanoid raid against your colony by hacking a mech emergency system and long range mineral scanner can spawn mechanoid hideouts on the world map. If you re getting low on mech parts, you re doing something wrong. Its intended, that you have to constantly get more, if you want to keep mechs on your side and you can't buy them from traders in reliable quantities.
In fact late game raids are so huge and bring so many mechs, that i have to sell off extra mech parts, despite having 10-14 mechs in the barracks.