Aklakar Rahman, 38, repeatedly made attempts to wound or kill prison officers, the Old Bailey has heard.