I actually don't agree that was a bad decision. I think that was the best decision to be made considering circumstances
On prime directive - I don't think he's violated it, as he restored situation to pretty much the closest possible way that would be without Enterprise showing up - as if the freighter would land, but won't be able to take off again
On the whole situation - it's clearly what is called a "social sci-fi", as in - it's not really about technological/realistic situation, but it's a theatrical play about class struggle. Planet B are clearly capitalists, they have knowledge and posses means of production. Planet A are workers.
So on topic of the decisions, what were the variants:
1. Send parts - restore space travel, let the situation to continue for some indefinite, but limited amount of time. Nothing will really change, as it was shown that this civilization as a whole is dysfunctional as it led to the failure of the only thing that kept it sustainable - space travel
2. Do not send drugs - that would make transition period (if any) impossible, angry the population, start the panic and make situation even worse immediately. This drug shipment gave them time that they MAY use to improve things
3. Help planet B somehow - I think the idea here is that it's planet's B fault - they had the knowledge and means to sustain the space travel and they failed it. They are the most dysfunctional part of the society and one transport of food won't help them. And transporting planet's A inhabitants there would just be a slave shipment. Planet B is unreasonable - they don't understand the gravity of the situation as clearly shown - and I think the idea is that they are going to get what they deserve.
4. Tell planet A inhabitants the truth - that would scratch out the planet B inhabitants sent to A possible options, while not really reducing (IMO) negative consequences as plague or not, withdrawal will be real.
I also would not agree that planet B inhabitants won't tell anything - their only assets in possession are knowledge. Stuck on planet A they have options - sit tight and die/be executed as soon as withdrawal kicks in, as planet A inhabitants clearly hate them and will surely blame everything on them. Or tell the truth to the leadership of the planet A and utilize their knowledge and ruthlessness to maybe stir the situation away from the worst scenario. This is basically their only option of survival.
Basically planet B is done in pretty much all variants as it's just dysfunctional (Brave New World, etc - quite common theme among utopias/dystopias/social sci-fi - leaders without/separated from workers can't survive).
Planet A have options:
1. Civil war with significant technological step back (planet B people die, no effective control measures)
2. Civil war without significant technological step back (planet B people survive/pass knowledge, but no effective control measures)
3. No war, no loss of knowledge, but creation of capitalist class on planet A (planet B people hijack control of the situation)
TL;Dr: So basically planet A have options ranging from anarchy to communism, with possible status-quo as capitalism. Pretty much whole spectrum - so in that case Enterprise's intervention does not cut out options of future development, but preserves them - which is pretty much what prime directive is about. They don't make choices for the people on planet A, they just ensured that all options are still on the table. And planet B have no choices to begin with, so who cares.