Balance data using different criteria
You would need to balance the data according to the joint distribution of all 3 features.

One simple option is to treat each feature as categorical (binning any continuous features), then map each combination of features to a single new feature:

doc_len_tokens  | status   | gender | level
----------------|----------|--------|------
1               | active   | male   | 1
1               | active   | female | 2
1               | inactive | male   | 3
1               | inactive | female | 4
2               | active   | male   | 5
2               | active   | female | 6
2               | inactive | male   | 7
2               | inactive | female | 8
... etc ...


You would then stratify on level when sampling.

Here is an example in SQL:

SELECT
    data.unique_id,
    data.doc_num_tokens,
    data.status,
    data.gender
FROM (
    SELECT
        data.unique_id,
        data.doc_num_tokens,
        data.status,
        data.gender,
        row_number() OVER (
            PARTITION BY
                data.doc_num_tokens,
                data.status,
                data.gender
            ORDER BY
                newid()
        ) AS row_num
    FROM
        my_data AS data
) AS data
WHERE
    row_num &lt;= ${number of rows to sample}