What you're talking about is the discretized knapsack problem, which is np-hard. There is no way to guarantee that the algorithm will ever find a solution, which is why Bioware's inventory management system doesn't operate smoothly as-is. Finding a space is non-trivial - happily, that's hard-coded. Unfortunately, that means that slotspace is not a property on any given item.
Making an item re-equip after being unequipped won't alleviate the problem, since every equippable item would have to have an OnUnequip script... and even that wouldn't help, because that only fires AFTER the item is unequipped... and dropped.
As for disabling unequip, I can say definitively that there is no NWScript command that allows that, short of cursing the item. However, checking all items equipped against inventory spacing any time the latter changes and applying the "cursed" flag to all violating items is, again, a non-trivial script to run every time anyone picks up an item.
Much as the system might be convenient, there's no easy way (that I know of, without rewriting source code), to make this happen... the best solution, as always, is keep space free, or suffer the consequences (vanishing items.)