Could a knee replacement surgery treat patellofemoral syndrome or chondromalacia patella?

Sometimes. Patellofemoral syndrome is often successfully treated with aggressive, committed physical therapy aimed at strengthening the inside portion of your quadricep muscle. Damage of the smooth articular cartilage on the undersurface of the knee cap is called chondromalacia patella. If this damage is severe enough, then either a partial or total knee replacement may be indicated.
It depends. Patients with isolated patellofemoral arthritis or severe chondromalacia refractory to conservative treatment may be candidates for isolated patellofemoral replacements.
As a last resort. Chondromalacia patella (runners knee) is due to overload of the patellofemoral joint (knee cap against the end of the thigh bone). Running causes high forces in this portion of the joint. So does arising from a chair, going up/down stairs. Treatment consists of activity modification, ice, anti-inflammatory meds and therapy aimed at flexibility and strengthening, especially of your core.