Heart Attack three years ago. Now have two stents, part of my heart is scar tissue so does not work too well.
My technique was a very steady progression from riding on flat trails to routes I know, initially I made sure I had someone with me plus a phone as a large part was overcoming the fear of pushing things too much.
For a long time I used a heart rate monitor with an audible alarm at 140 bpm, I knew when my heart rate was going up but this told me when to back off and anyone with me also knew.
I found it was a very gradual progress discovering what your body is comfortable with, too much and my heart aches for the next day and I'm certainly far slower up hills as I don't push my bpm too much past 140.
Now riding with a group of guys who are about 15 years younger than me, two hour off road rides that I consider hard and certainly the level of what I have done in fitter times, There is no way I can keep up on the climbs but I'm not always last and on the flat / downhills I do OK. I don't talk much as I need the breath. Always carry GTN spray with me and a phone with emergency contact details.
The person leading the ride knows my history but everyone else just assumes I'm unfit and old.