Engine braking can be pretty powerful, with a "Jake Brake " it can hold a 40 ton truck on quite steep grades. Hybrids ( F1 and road) have dynamic EBD to blend the motor braking with foot brake pressure.
But if you just have an old fashioned manual gearbox can you calculate engine braking with any accuracy?
Most of the variables are knowns - tyre rolling radius, final drive ratio, gear ratios , compression ratio and engine size.
So it should be easy but I suspect the problem is defining an effective CR which accounts for the cam overlap etc.
I suspect it might be better to just use your mobile's built - in accelerometer to measure de- acceleration directly - modern mobiles have many neat uses , you can even assess ride frequency with one and a $10 app.
Either way I have noticed that you an use engine instead of hydraulic braking most of the time on the road if you want to.