Thanks for your question. Please update your post title to be more descriptive of at least one of the issues you’re having.
For #1, I don’t think the step method can share the same context as where the counter is used. Add an inner-level context for the line that you display the thorem_counter, e.g. #context thorem_counter.display(numbering). The last paragraph of this section about context addresses your case explicitly if you want more explanation.
Your goals for #2 are not very clear. Can you please try to restate that and give an example?
For #3, this is because of the way you coded it, specifically this line: :#h(0.5em)#i \. If i is itself a thorem or contains one, then it will introduce its own line break, and then will be followed by another one.
I imagine you meant “Theorem” not “Thorem”, yes?