Sounds like you're describing a cotterpin system. It would work in theory, but I'd worry a 4mm hole through would weaken it a lot. A much smaller hole for a pin of some sort, perhaps. You may find you can't drill the scooter motor shaft easily anyway, I imagine it's a decent, possibly heat treated steel that regular small drill bits might struggle to go through. Getting a designed-for-scooter-motors sprocket may be the path of least resistance.