The legal standard, evaluated on a case by case basis, when one firm uses a trademark that is similar to another firm's trademarks to market its goods or services in the same industry is whether the trademark is "confusingly similar" and in some cases whether it "dilutes" the first in time famous trademark.
Many people writing fictional media, or making academic hypotheticals, make changes to an existing famous mark along the lines of those described in the question, in the hope of making a popular culture reference, while avoiding a feared exposure to trademark infringement and defamation liability. But that fear is mostly misguided.
A trademark is not a right to have monopoly use of the mark in writing or other media. "Nominative use" of a mark is legal and does not expose the person making nominative use of a mark to liability.
What is prohibited is using the protected mark to market goods or services in commerce, in a market where the trademark one fears being infringed currently exists and is being used to market goods or services of that trademark owner, to give the false impression of an association, affiliation, or endorsement by the trademark owner.
The gravamen of a trademark infringement lawsuit is fraud and deception perpetrated on consumers to the detriment of the trademark owner. This is almost never a real risk in a fictional work.
To the extent that there is a legal concern at all about distinguishing a fictional firm from a real one, the bigger legal exposure is to defamation liability.
In other words, the bigger concern is the risk that the fictional work is viewed as making a thinly veiled false factual statement about the real world firm that damages its reputation (e.g. if it were to depict a fictional analogy of the real world firm "Taco Bell" making tacos out of horse meat as the real world firm has often, falsely, been accused of doing in real life because its prices are so low).