For advanced equipment, you could implement a button that says, "reset upgrades." This button only appears if the gear was not worn for a game (or worn at all). This refunds all cash and BTs spent on the equipment, but lets the player keep the base piece.
Same goes for CE. Instead of having to track pieces and recalculate refund flex based on whether it was used or not, just check to see if it was used in a game or equipped. If not, a full refund is given, and the piece is treated as a blank piece of upgradable CE. Upon daily rollover, all blank pieces are purged, and a limit to the amount of owned CE would be implemented (something absurd, like 8, to prevent abuse). If the piece was used/equipped, then the button disappears.