Also mounting the electrical enclosure directly to the frame (made of aluminium) would it be a problem since it would basically be in direct contact with the machine frame? I mean that would be a direct earth connection for the enclosure. I am not too into electronics (yet)!
No. That will be fine just make sure that all grounds go to one star point. If the frame is painted I would make a direct connection from the box to the frame.