Yes. The most common misconception about e-bikes is that they are electric mopeds. With a pedal-assist e-bike (especially one with a torque sensor), the motor only works when you pedal.
Senior riders consistently report that e-bikes provide superior "Zone 2" cardiovascular exercise. Instead of spiking your heart rate to 160 BPM on a steep hill (which can be dangerous or simply exhausting), an e-bike allows you to maintain a steady 110-120 BPM heart rate for an hour or more. You are burning calories, loosening up joints, and improving stamina without the gasping, joint-grinding suffering of a traditional bike.
As one 67-year-old rider noted: "I get the same amount of exercise, measured by my smartwatch, as I did on regular bikes, except I'm riding faster and the distance is longer. It's too boring to sit and not pedal."