convex/affine is not (necessarily) convex, and therefore neither is (convex-affine)/affine-affine.
Please read
Section 5.6 “Compositions” of CVX User’s Guide http://cvxr.com/cvx/doc/CVX.pdf
Section 3.2 “Operations that preserve convexity” of “Convex Optimization” by Boyd and Vandenberghe Convex Optimization – Boyd and Vandenberghe
Nowhere will you find a rule that convex/affine preserves convexity.
Given that X is a binary, perhaps there is some binary or integer modeling you can do to accomplish what you want - I don’t know.