Unfortunatly, it's impossible to disband units using the script. You could play with a house rule to immediatly after the siege has been broken or lifted, but the AI wont disband units given to it for free, no matter how bad, although, if it was possible, I think personally it would be a good idea, even if only in certain areas.