Someone down the line has to actually act out the 'evil algorithm', and will then have to actually interact with the aggrieved customers. In a third party delivery service I imagine it would be trivially easy to get the line workers to betray the customer / rest of the organization, but there are also none of the incentives to, for example, try to dump low velocity items through deliberate substitution errors.
Also I don't think your approach need be how it's enacted. You could quite easily run a set of adjustments against the restocking priories to see which had the least negative effect on profits and that would likely result in this kind of substitution the way it's observed. This wouldn't even need one to put on a "let's do evil hat", couched in these terms it comes across as perfectly reasonable.
I don't know too much about the way the restocking priorities are established, but it appears to be totally ad hoc and at the behest of the shift worker on the line at the moment your order us started from what I've seen. The stores would need to have inventory systems fine grained enough to know that there are high margin items in stock to be swapped in to implement this kind of malicious action plan, but I think most stores (that aren't Walmart) don't even have their inventory spatially mapped at all, let alone multiple times per day to actively dump target items.
Deselecting the substitution acceptable option is also wise. This was a major obvious flaw even back in 1999 when Shatner was pushing Priceline - obviously they'd have an incentive to pretend they had to substitute a certain percentage of the premium brand stuff for cheaper items and do it sparingly enough that they made more profit whilst trying not to lose you as a customer. My experience in the UK is that Ocado always tries to substitute items with a worse cost to weigh ratio - it's particularly silly because they think I won't notice (feels like they should detect that I'm focused and dial it back!)