Answer
Not necessarily — in at least one confirmed case, this was actually caused by an unrelated database table being locked by other active sessions at the exact moment of the compile attempt, not by the number of attributes on the Custom LU. Before assuming an attribute-count limit has been reached, check for and terminate any sessions holding locks relevant to the compile (particularly on dictionary/metadata tables), then retry the compile — clearing session locks resolved this specific error without needing to reduce the attribute count.