You could easily write custom routes to handle this. For example, this:
http://example.com/companies/some-company/machines/add
would become in your .ini file:
routes.machine.route = "companies/:companyname/machines/:action"
routes.machine.defaults.controller = machines
routes.machine.defaults.action = index
This will point the url to the machines
controller and sets companyname
as a GET-var.
You can easily change this to suit any form you like.