It sounds very lofty, but also on a path to disappointment and burnout. You can't meet the needs of all students. Fortunately, your class is small, but even there you find that you can't please them all (let alone a class of 300). And I write "please", because that's what you appear to be aiming at.
First, a course is there to convey knowledge and skills, not to please students. I'm not fond of hard rules in education, but some are simply right. Rule number one is: set the levels in advance: determine prerequisites and end goals. You may accept students outside the range, but it's their risk to take a class that's too easy or too hard, not your responsibility to overcome. You could always split it into multiple classes (basics and advanced), but that's already setting yourself up for more work.
Second: try to use literature, books or articles, for material that takes too much time in class. It's better that they come with questions than that they leave with questions. However, I'm aware this doesn't work well, since students don't read before class.
Third, I'm not teaching anymore, but my former colleagues and friends who teach and even direct programs, tell that the flipped classroom isn't only a nebulous concept, it also doesn't work. Covid has shown that. Developing a technically complex class that actually works is going to be very, very time consuming, and not rewarding at all. Cynically: when the department finds out you're not actually physically teaching, they'll assign you to something else. Or give your class to someone else.
Fourth, try to be interactive in class: explain, then give short, direct assignments. Your topic is unfortunately too complex to do anything meaningful during class, but perhaps you can ask them to look at some code and write down what it does, compare two different position evaluators, find out why a certain move can't be returned by a certain algorithm, etc. The trick is to get them to actually work out and write down answers (and it can be wrong; there should be no scoring for these exercises), not wait for someone else to tell them, whether it's you or the bright, interested student who's going to pass anyway. Everyone should apply their full attention to the problem for a short time.
Another cynical remark: it seems you're interested in knowledge transfer. You don't get high ratings for that. If your school evaluates teachers based on student feedback, it's a losing game. The only thing left, if you want to stay in that game, is to make it "fun."