You don't need to optimize production to beat France. Put 15-20 Inf division (doesn't even matter if 20width or just standard inf) on Maginot, all you need then is 20-30 more divisions to take down Belgium, Luxemburg and France. Breakthrough is important, so you really want Panzer III (first medium tanks). I have 5-10 divisions of them by Oct 39 (5 med tanks, 2 mot inf, 2 SA Art). Those are my breakthrough divisions throughout the entire game. Also make sure to have other fast division, 20 mot inf (standard starting mot inf suffice, add recon and pioneers, maybe art and I kinda like field hospitals, because I want to keep losses down) will do and you still have 3 light tank division from the start of the game. That's really all you need. Put 6-8 inf on the Beglium border and plan. Put all your tanks and the 20 mot inf on the luxemburg border and plan. Make sure to setup your airforce: As many CAS as possible in Benelux (with air superiority of course, build larger airfields before war in 39) and some fighters over France (air superiority avoids speed malus). Once finished planning, DOW Luxemburg and make sure to attack with your breakthrough divisions first, so they are in the battle and not the Mot Inf. Luxemburg should last 2-3 hours. Make sure to simultaneously attack Metz with 2-3 divisions to pin them down. As your stack moves to Luxemburg, DOW Belgium and pin them down with an attack with the 6-8 divisions you have at their border. Move through the one Belgium province of Wallonie (again: attack with Panzers only, let others join the fight after Panzers have engaged), there should not be any UK troops there. Maybe there are some Belgians, but they will be crushed by Panzers. Once you set foot in the one Belgium province, just spread your units all over the field. I like to do a Panzer rush down south to encircle the Maginot line (always make sure to have the rivers on the right side of your divisions!) but it really isn't necessary (and kind of costly, because your 15-20 Maginot divisions have to attack the line in order to keep the units there which will cost you equipment and manpower). A couple of units go through Belgium and cut the still fighting Belgium frontline troops off supply, the rest wanders through France like the Geisterdivision. France is beat within 2 weeks max with 20k losses, make sure to occupy airports in France with your CAS and fighters as well.
EDIT: SA-Art is Self propelled Art.
EDIT2: Forgot: always go for the attack boost when breaking through and choose Rommel as leader of breakthrough units because of his attack skill.