If it was a constant money pit McD would have simply dropped them by now, their bean counters know better than you.
You don't understand the current mechanics of this. McDonalds Corporate and Taylor have a corporate partnership in place and both profit off this agreement at the expense of the franchise sites needing to have their machines repaired by Taylor.
And if you are looking for proof of the profits, Taylor published in 2018 that 25% of their revenue came from recurring parts and services business.
So from a corporate McD's standpoint, they are making money by having their franchise sites need to purchase a Taylor machine that constantly needs Taylor to fix (as they profit as Taylor profits, with 25% of those profits being from the repairs). So more, repairs = more profits for corporate McD's, but the franchise site loses as they are out the repair costs, as well as the sales on the ice cream.
Part of the issue is that the machines are "self-cleaning", which takes 4 hours to run and typically engaged by the night shift to run overnight and be ready for the next day. But if an error happens, the machine simply states an error occurred and the cleaning cycle did not complete and needs to be re-run, so the day shift trys to run the cycle again (another 4 hours) and then finally find out if it is "broken" because it fails again or if it simply was a random issue during the cleaning cycle. The machine does have error codes, but it is not given to the users, only Taylor techs can get them to find out what the actual error was with the cleaning cycle. Another company, Kytch, actually made a device that could read the error codes and tell the McD franchise/operator what is wrong with the machine so they could fix minor issues and get it back in service, but Taylor didn't like that and said that using the device would be harmful to people, and McD Corporate banned its use. Taylor then seemed to reverse engineer and make a duplicate device and started selling it, but were sued by the people who made the original one that Taylor said was "harmful", with that lawsuit still ongoing, with Kytch winning an injunction against Taylor, getting a Judge to agree that they were very likely infringed on by Taylor, and the judge having Taylor turn over all the duplicate devices they made to Kytch... The main case is still pending on things like damages, etc....
Long story short, Corporate McD's makes more money on having the franchise owners need to pay Taylor to maintain the often broken machines. Franchise owners get screwed since up until just a couple years ago, they could only purchase the machine from Taylor (they can now get one from an Italian manufacturer, but parts and service techs are almost non-existent in the USA/Canada markets and are really only available in/around Italy).