Unique input IDs in Freeform
Solution for Freeform 3:

Preventing duplicated field id:
Set a custom field id prefix. Using the form handle might be a good id, as long as you're not using the same form twice on the same page.

Preventing duplicated form id:
Manually adjust the form id parameter to something unique.