You can wrap the entire form in a module and apply a class to that wrapper like image below.
Then when targeting individual fields, in css and js, you can target them by using type and field selectors.
.form_class input[type="text"],
.form_class input[type="name"],
.form_class input[type="tel"]
etc. and
.form_class input[type="text"]:first-of-type
etc.