What is an efficient algorithm to partition $nk$ objects a total of up to $\frac{\binom{nk}{m}}{n\binom{k}{m}}$ times, each time making subsets of size exactly $k$? The additional constraint is that no subset of size $m$ is ever repeated within any of the $k$-subsets (where $m$ is a given constant and $m\leq k$). Obviously, this is only possible if $\frac{\binom{nk}{m}}{n\binom{k}{m}}$ is an integer. Even if this is not always possible, I am still interested to know an algorithm that is able to accomplish the maximum number of successful partitions.
For example, if $n=k=3$ and $m=2$, then we have $9$ objects and we want to partition into groups of size $3$, such that no pair of objects is ever repeated in any $3$-subset. For this example, it turns out we can hit all $\binom{nk}{m}=\binom{3(3)}{2}=36$ pair combinations in $\frac{\binom{nk}{m}}{n\binom{k}{m}}=\frac{\binom{3(3)}{2}}{3\binom{3}{2}}=4$ partitions. For this small example, inefficient algorithms like the solutions in https://stackoverflow.com/questions/8133347/how-to-split-a-list-into-subsets-with-no-repeating-elements-in-python work. An example solution is:
((1, 2, 3), (4, 5, 6), (7, 8, 9))
((1, 4, 7), (2, 5, 8), (3, 6, 9))
((1, 5, 9), (2, 6, 7), (3, 4, 8))
((1, 6, 8), (2, 4, 9), (3, 5, 7))
But I want to be able to solve larger sized problems (e.g. $n=17,k=3,m=2$) and at least be able to maximize the number of valid partitions (even if a full solution is impossible).