Green’s Dictionary of Slang

toco n.

also toko
[? Gk tokoz, interest (OED), Hind. ???? (?oko), imperative of ????? (?okn?) to blame or censure (Y&B), Maori toko, a rod (Partridge)]

punishment.

implied in get toco (for yam)
[UK]T. Hughes Tom Brown’s School–Days 119: The school leaders come up furious, and administer toco to the wretched fags.
[UK]G.A. Sala My Diary in America II 368: Plenty of bullocks liver for the docile, but an abundance of ‘toco’ for the refractory.
[UK] ‘’Arry on Law and Order’ in Punch 26 Nov. 249/1: When a reglar Primroser gits toko, one wonders wot next there will come.
J.D. Gordon Work and Play in India and Kashmir 21: It was a matter of faith with the young native mashers that she sang divinely; as a matter of fact, the sounds she produced resembled a steam whistle practising Wagner, or a naughty girl getting toko from her awful dad.
[UK] ‘’Arry on the Elections’ in Punch 27 July 39/1: What beans it must be to ’old ’Arcourt, wot toko to Lawson and Caine!
W. Cooke in Yule & Burnell obson-Jobson 928/1: TOKO, s. Slang for ‘a thrashing.’ The word is imper. of Hind, ?ohn?, ‘to censure, blame,’ and has been converted into a noun on the analogy of bunnow and other words of the same kind.
[Scot]‘Ian Hay’ Lighter Side of School Life 154: A captain does not nowadays ‘administer toco’ upon the field of battle to subordinates who have failed to prevent the enemy from scoring a try.
[UK]J. Cary Horse’s Mouth (1948) 32: Hit her with something harder. On the nose. Toko on the Boko.

In phrases

get toco (for yam) (v.) (also nap..., catch toco instead of yam, get toko (for yam)) [for in this context equals ‘instead of’]

to be punished; opposite of give coco for yam under coco n.1 ; thus give toco/toko for yam, to punish.

[UK] ‘Battle’ in Fancy I XVIII 427: When in, the Bishop returned toco for yam to so much purpose, that it sent him down, for the first time.
[UK]‘Jon Bee’ Dict. of the Turf, the Ring, the Chase, etc. 124: ‘To nap toco for yam’ to get more beating than is given. [Ibid.] Toco for Yam Yams are food for negroes in the West-Indies, (resembling potatos) and if, instead of receiving his proper ration of these, Blackee gets a whip (toco) about his back, why ‘he has caught toco’ instead of yam.
Colonial Mag. IV:16 456: 🌐 At about 9pm, the privateer ranged up close upon the larboard quarter; to baffle this intent, Lennon yawed to port, bringing his larboard guns to bear, and, as Quashee says, giving his antagonist ‘toko for yam.’.
[US]Whip & Satirist of NY & Brooklyn (NY) 22 Jan. n.p.: Although Crawley one-twoed his man, he caught toco for his pains [...] and was sent to grass.
[UK]Newcastle Courant 25 Nov. 6: Oh, yer none the worse, and anyway yer gave him toko for yam with a vengeance.
Gilbert & Sullivan Mikado Act I 🌐 But as I’m engaged to Ko-Ko, / To embrace you thus, con fuoco, / Would distinctly be no giuoco, / And for yam I should get toko.
give someone toco (v.) (also give someone toko)

to beat someone, to thrash someone.

[UK] ‘’Arry on Niggers’ in Punch 15 Mar. 113/2: And if they will kick up their ’eels, give ’em toko!
[Aus]Bulletin (Sydney) 7 Nov. 11/3: Though a Bishop’s a man of much mitre / He’s seldom ‘great shakes’ as a fighter; / But this good Bishop Lioko / Will give that Priest ‘toko’ / When they meet in the realms that are brighter.
[UK] ‘’Arry on the Elections’ in Punch 12 Dec. 277/2: Give them dashed furriners toko with tarriffs tremenjously hot.
[UK] in Punch 21 Feb. 87: Were London lighted, how could you and me / Garotte a swell, or give a tight ’un toko?
[UK]J. Cary Herself Surprised (1955) 164: I took your trousers down last time and gave you toko.