Hi Best-
I hope all is as good as it can be after everything you've been through. I would hate to try to give medical advice on here so obviously please make sure to ask your Doc about how much exercise you and your ticker can handle. However, from a common sense standpoint, I would think that trials is one of the best things you could do. You are giving your body a stress, a good stress, from which all of the benefits of exercise are based upon. You give your body a stress, it adapts by supercompensating and readying itself for the next stress- Exercise 101.
Trials is a very good blend of aerobic and anaerobic stimulus. Again, I'm not a Doc, just a fellow trials rider, but I do know a thing or two about exercise. Trials riding is vigorous, even at the low levels. You will very likely burn fat, increase the efficiency of how well you use oxygen, and put a very needed demand on your muscles (heart too) that has myriad benefits. Also, your nervous system is constantly challenged with the demand of balancing and making quick judgements while making your body adjust to them, (can I clear that log?, can I make that turn?). All great stuff healthwise. Never mind the fact that you are outside, sweating, moving and breathing fresh air. Please check with your Doc, but I hope you keep riding not just because you can- but because your health will likely improve as a result of it. Best of luck.