Adding on top of Emre's answer, product formation depends on certain reactive groups say for e.g., $-OH$ (Alcohol) having more chance of releasing a Hydrogen than $-CHO$ (Aldehyde) or a Methyl $-CH_{3}$. Instead of using reactants as categorical variables you should use reactive groups on that, as variables.
For example if you take a vector of say (Chlorine, Alcoholic_group, Amine) to be coded for Para-Amino Phenol, it will be $(0,1,1)$ as chlorine is absent and for $CCl_{4}$, it will be $(1,0,0)$. But remember the first vector will be same for O-Amino Phenol as they are positional isomers. But both have different properties and reactivities. So categorical is kind of wasted here.
In my more deeper and frank opinion, these values should be continuous. You should be kind of looking for a value to quantify these each dimension of the vector coded. Then you can use classifiers from this vectors to find the probability of reaction happening or for product formation as @Emre mentioned.
So, take a simple, small set of molecules and make a vector having fewer dimensions and test it with categorical and continuous values(Give a value to each dimension based on your chemistry gut opinion). That is the better way to find whether your hypothesis/assumptions are reasonable.
EDIT 1:
My answer basically answers whether reaction is feasible or not but does not answer which products are returned. I am sorry for that. But I hope it kind of points to what you can achieve with ML if you want to take your first step.
Hope this helps.