It can be done for Step I at least. Especially if you go to a school that teaches a ton of non-step I minutiae/garbage and wastes a lot of your time with poor curriculum while you do mostly self-study (explaining why you are in the bottom 1/2). Of course this is definitely not applicable at every school, since there are some schools where the best way to study for Step I is to study for classes since their curriculum is pretty good/not a waste of time.
Granted it will be a minority of cases, but students from schools in the first category can just spend pretty much all of M2 studying for Step I and mostly ignore the inefficient/practically useless materials their school lecturers give them. They will still pass all of their classes (won't honor them since theyre learning from good resources like Pathoma, Kaplan, Dr Najeeb, etc. and these resources don't cover the unimportant factoids that PhDs or PharmDs or even some MD professors will want you to know that will never be asked on boards but do show up on class exams). As an example,
I had a pharmacology professor (PharmD) who consistently wrote horrendous questions like asking what the half-life of a specific drug is, what the risk stratification protocol is between various ultra unique situations between drugs within a class, asking some other factoid about something you could only find on the monograph insert from the drug company in the pill bottle, etc. Basically to get 100% on the tests you had to memorize word for word her entire 100+ slide powerpoint for each lecture she gave. But the fact was, she didnt write all the tests questions, so you could still pass just by studying from sane resources like Becker/Dr. Raymon lectures. Of course many classmates did spend an inordinate amount of time memorizing every little detail while the rest of us just did practice questions from Pre-Test, BRS, Lippencott, USMLERx, USMLE Consult, UWorld, etc. The latter group would do worse on the class exams, but it was a small sacrifice when you consider you don't spend a ton of time memorizing rubbish that you will never need to know for Step I (or probably even practice in general honestly).
If you go to a school with a few classes where some of the professors are like this, and you choose not to play the memorize every factoid from the powerpoint game, and instead do 3-4 QBanks over the course of 6-7 months you can likely easily pass your classes (just pass), but do very well indeed on Step I. The more of the good questions you do the better you will end up doing... and it doesn't really matter how "smart" you are, the material on step I is finite in its scope and there are only so many ways to ask a question about the material.