It's best if you can amalgam both the interest of student and faculty members choices. Lottery is not a good option as it does not help both either student or faculty interests. How about inviting project proposals from each of the student before allotment. Based on the proposals you would be able to screen some of the students choices and then making another layer of distribution based on academic performance. I would also suggest if the distribution of students would be carried out by independent people outside the department, it would remove the disparity of process.
In my earlier Department, we have devised a method to allot supervisors to the students by Merit cum Student Preference criteria. With the initial idea of my department colleague, Dr. Vikram Singh, we are able to optimize almost perfect allotment of students, where each of the supervisors would get equally talented students at the same time, this strategy also accommodates student's preference for a research group. The complete strategy followed is as explained below:
Step#1: First tabulate the students in order of merit. For instance if there are 30 students in a class, arrange them in order of merit based on their previous grades.
Step#2: Make blocks of students based on number of supervisors. For instance if their are 05 potential supervisors, the list of students will have 06 blocks of 05 students each (namely A, B, C, D and E and F). First block of students, say block A, which is a block of toppers, will have rank#1 to rank#5. Rest of the blocks will be followed.
Step#3: Now, ask the students from block A to chose one of the 05 supervisors available. It could be mutually agreed exercise if all 05 students will have non-overlapping interest and each will get a Supervisor of his/her choice. In case of conflicting pairs of Student-Supervisor choices, a lottery could be carried out only for the conflicting cases and will be resolved.
Rest of the blocks could be also resolved in this manner. In this method, all the supervisors get range of students in terms of Merit (as they will get students from each of the blocks) and also it accommodates the Preference of the students, therefore, it works perfectly. If there will be any confusion please talk to me. Ashutosh Kumar