Two separate jobs, two different problems, and you have skipped both.
Backflushing, removes coffee oils and grounds from the group head. Oils go rancid and that is very likely your slightly worse shots. Coffee is fat, and two years of it baked into the shower screen and the valve tastes exactly like old fat.
If your machine has a three-way valve, you use a blind basket and a small amount of detergent made for the purpose. If it does not, you rinse with water and clean the screen by hand. Check which yours is before you start, this is the one place you can genuinely do damage by following the wrong instructions.
Roughly: water backflush daily, detergent weekly, and take the shower screen off and soak it monthly.
Descaling, removes mineral scale from the boiler and pipes. This is the one that kills machines. Scale insulates the heating element and blocks narrow passages, and the failure is expensive.
Frequency depends entirely on your water, which is the next answer.
Start with the backflush and the screen. That is an hour, it is the reversible half, and it will probably explain the taste.