It's an occasional but very awkward thing in this game to change your class or gear set and find that you're suddenly standing in the middle of town in your underwear, because you either:
1. have manually changed class are no longer allowed to equip the clothes you were wearing
2. accidentally sold/discarded the gear
3. moved it out of the armoury chest into your inventory
4. upgraded the gear - eg. newly-augmented Ironworks gear will not be recognised as the same item and will not be equipped when you switch back to that class.

Could we please get some kind of warning and a chance to confirm whether to go ahead with the class change in this situation?

We do already get a similar warning (and offered a substitute) if the main weapon/tool listed in the gearset is unavailable but there is another one we can use instead, so perhaps this could be extended to all gear.