No, driveway leveling via concrete lifting foam isn’t the right approach for a driveway with many cracks. A severely cracked driveway will probably need to be dug up and replaced. Concrete replacement takes longer – the repair crew has to make several trips to the property – and costs more.
The only way to know for sure if your uneven driveway can be leveled using poly foam is to call a foundation repair contractor who does driveway leveling and ask for an inspection and estimate.