Wing flex is simply the cumulative deformation of the material. All materials deform under the stress induced by a load - it is called strain. If you have the same load then a thick section will have less stress and therefore less strain/deformation/flex but more weight.
The idea of not flexing or they will break is 99% of the time wrong. Flexing is only a good thing if it reduces the load in a desirable fashion, or if the parts it is attached to are going to move relative to each other no matter what (enforced displacement). So a skyscraper flexing in the wind doesn't relieve any load it is just the material straining under the stress. Again more material would cause less stress and therefore strain/deformation/flex but material isn't free or weightless. In an aircraft the wing center section is under considerable stress. It deforms. The fuselage is pressurized. It deforms. if you try to rivet a stiff piece of metal between the wing center and the fuselage it is going to break, because of those enforced displacements. So those parts are purposely made flexible (The wing attachment to the fuselage are point connections usually).
So flex is just the nature of the beast. The problem with flex isn't with strength of the wing. Wing flexing changes the aerodynamics of the wing and must be very carefully accounted for. Additionally there is the problem of the wing can act like a huge flat spring vibrating up and down and twisting. If the aerodynamic effects act at a frequency that enforces that vibration it can get ugly very fast.
As far as cracking goes, cracks grow differently in thin metals then thick metals. Thin ductile metals will usually give you plenty of time to inspect and find a growing crack. Thick ductile metals tend to grow cracks rapidly once they reach a certain size. That is why landing gear, helicopter rotor parts, etc are often life limited and have to be replaced a certain number of hours or flights.
In the old days aircraft parts might be sized based on a dozen conditions with huge multipliers added to ensure the parts were adequate. Now hundreds of combinations of conditions are considered and the parts can be ensured to be adequate with much smaller multipliers. This leads to lighter weight and often actually overall stronger structures.
So a few paragraph summary of years of study.