back around 1995, I had a 1990 Daihatsu Applause with a 1.6 SOHC 16V engine good for 77kW I think.
ULP (91) or premium (98) (No E10 back then) made no difference to the butt dyno, but with accurate and repeated measuring of fuel economy, the 98 got more than 10% extra kms.
I'd measure how many litres of fuel I put in to get the first click/shutoff from the bowser, divide L by Kms travelled or vice versa.
In essence, 40L of 91 octane would only get 400km, but with 98 in the tank, 40L would easily get 440km from the same driving style.
Back then, 98 was only 10c / L more expensive than ULP, so an easy choice.
Every other car I've had since, if it didn't need premium, premium made no difference to mileage. (non premium cars: Hyundai Excel, Eunos 800, AWD Magna, '09 Suzuki Swift)
So, yes, some vehicle's ECUs can self learn and advance timing to make better use of higher octane fuels. Most probably don't.
My last car was Subaru Forester XT - I've learned from it that a bad batch of fuel will result in the ECU retarding timing to protect the engine, but it doesn't return to normal.
ECU downloads showed some red flags and it needed a ECU reset (disconnect battery for x minutes) to get timing back to normal learning mode.