How to add phone number field with extension to webform component
You could add a phone field as you described for the phone number.

And add another field of type number for the phone extension, you can limit this field to be only numeric and 4 digits.  

And even to make sure that the phone number is introduced and not only the 'phone extension', you can add a Webform conditional to display the 'phone extension' field only if the 'phone' field has been filled.