I don’t know. If an elephant can get in your pajamas, it’s capable of doing just about anything.
Another way of thinking about the size requirement: the largest item a snake can eat in a single sitting is rarely more than 1/4 to 1/3 of its body weight. A 7 ton elephant by that math means a snake in the 20-30 ton range.
Since titanoboa was believed to be just over 1 ton, the mass of a snake that could realistically eat an elephant would have to be 20x the titanoboa’s weight.
How that correlates to an increase in length depends a lot on how proportions change (i.e. whether the body is relatively thicker than the titanoboa or not). Assuming no change in proportions, though, that increase in weight would need something between 2x and 3x as long (80-120 feet).
Which is all a very long-winded way of agreeing with HoneyBadgerDC’s estimate of 120 feet.
In terms of what limits size - other than the cube square law already mentioned, the researchers studying titanoboa also cite a relationship between maximum snake size and the temperature of their environment. Being cold-blooded, a snake in a cold climate lacks the metabolic activity that would be required to get very large. They’re estimate an average temperature of 90 F for the titanoboa. An elephant-eating snake would either need a metabolic overhaul, or we’d have to grow them on Venus.