If I were you… I would suppliment your strength training (the weights you are moving now) with some mobility work.
Where that mobility work is focused on getting you back to squatting.
Sounds like you know what went wrong with the dislocation: Your knees caved. So what you need to work on is good form for your squats so that your knees don’t cave. Doing things right is the best thing you can do toward preventing your doing something wrong (e.g., your dislocating your hip again).
Suck it up: Start from the beginning and progress as you are able. Sounds like you now truly understand the meaning of as much weight as you are able where as you are able means as good form allows.
You aren’t likely to fuck yourself up doing lowish reps with noish weights. So start from there.
How does your air squat (squat with no weight) look? Or how about if you hold a dumbbell or plate (5-10 kg is enough) in front of you? Post a pic. side on so we can see your lumbar position. front on so we can see your knee position.
You can indeed learn to squat again. Best possible thing you can do for your rehab in fact. It might take you some time to build up to weights that will lead to appreciable hypertrophy or strength, though. So you might choose to suppliment with machine strength program. but do it, yeah.