It sounds like he may have been underfed for a very long time and thus assumes that fast or sudden movement is food until proven different. I would try treating his behavior as an extreme food response rather than defensiveness or aggression.
So, start by using a small hook. When my retics show me that they're being extra stupidly foody one trick I use is to rub a tiny bit of scented hand sanitizer on the hook and on your hands. Scents like lemon or "fresh scent", which are very sharp, work well. Just crack the door or tub lid enough to slip the scented hook into the enclosure and let the snake smell it. Usually once they smell it they back off. Then rub or touch the snake with the hook, and then open the door after the snake's posture shows you that it knows it's not getting fed. At that point you can put your hand into the enclosure.
With my bigger snakes I do the above steps every time I open the door. It might be overkill but I really don't need an ER visit because one of my 16 footers mistakenly thought that my hand was a rabbit.