Can cooking oil kill fleas?
Short answer: Mire them in a viscous liquid then leave them in there long enough for them to die, instead of immediate disposal.

Cooking oil is viscous, so yes you can viably use it to mire the fleas. You'll need to wait until they die though to dispose of them or else they'll come crawling back as you've stated. The DIY option is generally a water/dish soap mixture in a container: you'll put the fleas in and they sink to the bottom almost immediately. Just leave them in there and they'll eventually die in about 5 minutes. Some individuals suggest Dawn dish soap, much like here, where the claim is that the Dawn contains compounds which suffocate the fleas.

You can also make a flea trap for around the house, with a bowl of dish soap and water near a night light. They'll jump for the light and end up falling into the flea trap.