Which LEGO set is best suited to build robots? My goal is to build some educational robot kits for kids and so I'd like to know if there are any LEGO sets that let you build almost anything or can you only can build the specific model that the package is designed for?

I am looking for general parts to build different sorts of robots but I  do not mind about electronic parts (motors, boards, sensors, etc. as I can build or buy those), I'm really after mechanical parts (gears, axles, beams, etc.).

I do not want pay for moulding and prefer to use something like LEGO parts, but I am unsure which LEGO set will offer the most flexibility to build anything I want?

Also if there are other universal building products other than LEGO that I could use I would be happy to know.
Your question is not so clear, but it seems like you want to build robots and you want Technic pieces. Then Lego Mindstorms is the product you should buy. While not formally part of the Technic range, it contains only Technic elements in addition to the special electronic Mindstorms parts.

You can also take a look at Lego BOOST, a lightweight variant of Mindstorms, but that is not as much oriented around Technic pieces.

If you don't want the electronics, then you could consider the Bucket Excavator which contains a large number of elements for a fair price. Alternatively maybe you should also look at Meccano.