The terms "ecological footprint" and "carbon footprint" predated BP's adoption of them, which the company repurposed to project an image of environmental responsibility.
The Oxford English Dictionary (OED) is an excellent resource for exploring the etymology of words and phrases, as it describes itself as a "historical dictionary" (About the OED). Although it is paywalled, free access may be available through your public library.
The concept of a footprint referring to "the cumulative effect of an activity on its environment" (OED), originated in 1979 with a statement by Edward C. Hardy, president of Yosemite Park & Curry Co., to the U.S. Senate Committee on Energy and Natural Resources (1979, pg. 799):
An alternate proposal that would remove environmental footprint from Yosemite Valley [...] would remove a number of buildings, consolidate service, and reduce somewhat the number of employees.
It wasn't until 1992 that the term "ecological footprint" (OED) was first used by William E. Rees, a Canadian professor who suggested the term in a journal article published in the Environment and Urbanization (1992, pg. 121):
The total area of land required to sustain an urban region (its ‘ecological footprint’) is typically at least an order of magnitude greater than that contained within municipal boundaries.
Seven years later, in 1999, the first recorded instance of "carbon footprint" (OED) appeared in the April edition of the BBC’s Vegetarian Good Food magazine. The BBC discontinued the publication a year later, and no digital copies appear to be available through Archive.org, HathiTrust, or Google Books.
To consult a copy, you may need to request one through WorldCat. From the copy I was able to access, the article was written by Julian Rollins, a journalist who specialises in the environment, while referencing ideas from Dan Morrell (Vegetarian Good Food, April 1999, pg. 86):
To cancel out the damage we do, Morrell believes we should plant trees, and that in doing so an individual or organisation can erase their carbon ‘footprint’.
If brainchild is defined as “the product of a person's mind” (OED), and given that I found no evidence linking Julian Rollins to any advertising firm, in that case, it is inaccurate for Rebecca Solnit to have described carbon footprint as “the brainchild of an advertising firm” (The Guardian, 23 August 2021).
The same applies to Brad Bergan, senior editor at Interesting Engineering, who similarly wrote four days later that the term was “coined by an advertising firm” (27 August 2021) given coined is defined as “to frame or invent a new word or phrase” (OED).
However, the claim made by Mark Kaufman, the science editor at Mashable, that BP "first promoted and soon successfully popularized the term" (Mashable, 2020) carbon footprint, concerns the company’s role in popularising the phrase rather than its creation.
The evidence of BP's involvement in popularising the term carbon footprint is more circumstantial. For example, Professor Brigitte Nerlich wrote an article in the Journal for Technology Assessment in Theory and Practice where she compared the usage of the terms greenhouse effect and carbon footprint between newspaper and academic articles.
She found carbon footprint first appeared in 2005, a year before academic sources (Brigitte Nerlich, 2014):

This was the same year that BP launched their carbon footprint calculator, which was captured by the Internet Archive a year later (BP Sustainability Report , 2005, pg. 41):
For example, in 2005 we launched a simple carbon footprint calculator on our website, based on UK and US data, for residents to assess their household CO2 emissions and to see how they can reduce them.
According to Professor Geoffrey Supran, BP have denied popularising "carbon calculators or the concept of a carbon footprint" (WBUR.org, 2023):
BP did not popularize carbon calculators or the concept of a carbon footprint. Various NGOs, governments, and news organizations had already popularized carbon calculators before BP offered such a tool around 2005.
BP are correct in saying the idea of a carbon footprint calculator existed before 2005, with the Internet Archive capturing one from SafeClimate.net in 2001, but not all used that terminology, with one calling itself an "Ecological Footprint Quiz" (MyFootprint.org, 2001).
However, none of those sites had the backing of a hundred-million-dollar ad campaign. According to Nielsen Media Research, 2005 was the same year BP spent $145 million on advertising (Adweek, 2008):
During the most recent period, BP’s U.S. media spending fluctuated from $145 million in 2005 down to $100 million in 2006, then up again to $125 million through October 2007, according to Nielsen Monitor-Plus.
The type of ads BP displayed that year (NewsPapers.com, 2005) included carbon footprint in their messaging and asked people to "find out the size of your household's carbon footprint" (The Guardian, 2021):

People with media training, like Professor of Media and Communication, Julie Doyle, explain that this kind of messaging uses "existing discourses of environmentalism in order to create a brand image of corporate environmental and social responsibility". This has the subtle effect of shifting the blame to the reader (Culture, Environment and Eco-Politics, Julie Doyle, 2011, pg. 12):
A series of advertisements invoke the concept of the carbon footprint [...] seeking to explain to the audience what a carbon footprint is, but in a way which assigns responsibility for climate impact to the individual, while BP registers its own concerns by appearing already to be doing something about it.
This aligns with the objectives of the public relations firm responsible for BP's "Beyond Petroleum" campaign, which employed these terms and concepts. A case study featured on their website detailed their strategy to reposition the company as one perceived as "environmentally responsible" (Ogilvy PR, 2008):
The newly re-branded, global BP sought to position itself as transcending the oil sector, delivering top-line growth while remaining innovative, progressive, environmentally responsible and performance-driven.
In summary, BP leveraged pre-existing terms like carbon footprint to cultivate an image of environmental responsibility, while subtly shifting the burden of action onto consumers. This strategy was bolstered by a hundred-million-dollar advertising campaign, which coincided with a sharp rise in the term's usage.