I’m not sure it’s necessarily something that needs punishing. A slow skill rot might be appropriate for DF levels of attention to detail, but at higher levels the punishment for changing you highly skilled carpenter into a generic worker is that you’re now short a highly skilled carpenter until you change him back. It also seems like a fun distraction to get a citizen to max level (or close to it) in all classes - it wouldn’t be practical because every time that citizen started being useful they’d then be reassigned to some menial task, but it’d be fun for an achievement.
I think what we want to prevent is rapid job changing to handle minor micro stuff like getting your weaver to help out with building houses while they’ve got nothing better to do, since that would reward an unfun level of micro. I think the best way to handle that is to give a severe morale penalty for “demoting” someone. A level 10 Carpenter should be furious about changing jobs, no matter the level of the new job. At level 1 and lower, a worker might not care one bit about losing that job.
As far as military goes, this should allow you to “draft” your citizens at a scaling morale penalty. Unless your town is in mortal danger, having your best carpenter in a sour mood for a week isn’t worth having that extra foot soldier.