She calls it malware, if she was an Apple engineer, she should be able to give a hint where to look so that interested parties can disassemble the code and investigate. With no specifics, it looks like a former engineer that holds a grudge. Not saying that this is the case, but she would make her position stronger with some specifics.
It seems to me that it's much easier to just not optimize new code paths for older devices, introduce changes that require more performant hardware (cough, Liquid Glass), etc. That together with the natural bloating of applications and websites does enough to slow down older phones. Especially because Apple has always been conservative with the amount of memory in their phones. E.g. even the iPhone 17 still has 8 GiB RAM, while comparably-priced Android phones have 16 GiB RAM.