I decided to give this its own thread because the method got hidden in another thread.
I feel it may be a little easier than the stack corruption method.
1. Get your bad clone. If you have access to an emulator, you can try a breakpoint method for BGB described in this article (note you must use box 4 and five Pokémon in the box for this). Testing on French, the breakpoint for de seems to be the same as the English version for French, German, Spanish, Italian versions, but I don't know for sure re: other non-French versions, and Japanese/Korean are likely to be different.
If you don't want to obtain a bad clone, then theoretically you can use the Hall of Fame SRAM glitch to get a bad clone (but both Sally and I didn't confirm it outside of English Gold). This is a tricky glitch as you must go through the entire game without saving. I don't know if obtaining any key items would mess things up too, but worst case scenario you can possibly trade a ????? from this glitch on to another game or try an international trade. Trading a ????? obtained from the English version's Coin Case glitch might be an option as well.
2. Put a Machop with Seismic Toss as move 1 in the party (learned at Level 19). I chose this over the Bellsprout method. Not sure if it's that harder though.
3. Stabilize your bad clone to get a ?????. Put this at the top of the party and the Machop after it.
4. Move a Pokémon above ????? to get 7 Pokémon.
5. Take the second Pokémon (a ????? that changed from 00 to FF I think) into the Day Care.
6. Deposit the first Pokémon. Machop should now be in the first slot after depositing it.
7. Deposit the second Pokémon. Machop should now be holding a Mystery Egg.
8. Keep depositing the first Pokémon and fix the party. Don't take Machop's item yet.
9. Clone Machop to obtain another Machop holding a Mystery Egg.
10. Take both Mystery Eggs. The key items should now just contain two Mystery Egg stacks.
11. Don't swap them yet, and have in the Balls pocket exactly: Great Ball x1, Poké Ball x2.
12. Swap the two Mystery Eggs. You should now have Master Ball x5 and Ultra Ball x255.
13. Toss from the Ultra Ball stack to equal the TM/HM (which will be forced in the Balls pocket) ID you desire. For example, tossing 47 to get 208 will give TM17, an arbitrary code execution item.
14. Swap the Master Ball x5 with the Ultra Ball x(amount)
15. Deposit a Mystery Egg you should have, and then withdraw it again.
This will result in you have the item you desire in slot 1. It doesn't just work with TMs/HMs, for example you can obtain a wrong pocket Rare Candy (quantity of 32) that likely has infinite use instead. However it's a good idea to get arbitrary code execution set up first, and then you can use box names to obtain other wrong pocket items like HM01.
Let me know if you have any questions. :)