This is an interesting question, and a life cycle emissions analysis can give a pretty good answer. Obviously there are a lot of variables, so some basic assumptions have to be made.
We start with the CO2 equivalent emissions from building and driving a car over its lifetime. There are various analyses out there, but here is one that I found which gives the following values for a typical gasoline powered automobile over a "typical" lifetime of 150,000 km (93,000 miles): 24,000 kg of CO2e emissions total, of which 5600 kg is from the fabrication of the car.
For the oil, I found this, which gives a range of 2.5 to 13 kg CO2e per gallon of motor oil. The lower value assumes the new oil is made from recycled oil, and the waste oil is sent to a recycler. The higher value assumes the new oil is not from a recycled source, and the waste oil is not recycled. For the most extreme case, we can assume virgin oil, and assume the oil is changed every 3000 miles, and that the car holds 4 quarts (1 gallon). That makes 31 oil changes in the car's lifetime, which gives 403 kg of CO2e from oil changes. Another perfectly reasonable value might be to assume recycling and assume an oil change every 7000 miles which results in 33 kg CO2e emissions.
So the oil changes are contributing something in the 30 to 400 kg range over the life of the car, compared with 24,000 kg from building and driving the car. Skipping all oil changes in the most extreme case results in less than 2% reduction in total CO2e emissions. You can get almost exactly the same result by changing the oil every 7000 miles instead of every 3000, and by using recycled oil and making sure that your used oil is recycled.
Even though you're not asking about it, I have to add that I think you have been exceptionally lucky if you drove 400,000 miles without changing the oil. I don't think you should expect that result again. And note that the emissions associated with building a car are 5600 kg - 10 to 100 times greater than the emissions contributed by changing the oil. If you don't change the oil in any car again for your entire life, and end up ruining just one car as a result, you will cause far more emissions than you saved.