If you know the answer and it's a valid question (i.e. it's not trivial or easily googled already), it's fine to do. The point is less to reputation farm as it is to share knowledge.
There's nothing "fake" about self-answered questions, and Stack Exchange even includes UI specifically for posting an answer at the same time as your question.
I suppose the part where the writing structure is "question written as if by someone who does not know the answer themselves, answer written as if it's a different person", even when explicitly posting to share knowledge, is what throws people off. I assume this is part of the SO guidelines but I can't blame anyone for being confused by that.
SO allows multiple answers per question. I have on occasion asked something and given a crappy/hacky self-answer as a stopgap, with somebody else eventually chiming in with a much better one later.
There's nothing about the question or answer that suggests that they're different people.
FWIW I've done the same, even more like that than the post here. (Not about Lego though!) I had a problem, was disappointed not to find the answer on StackOverflow so when I came to post the solution I put the question in the way I would have written it before I figured out the solution. Seemed more likely to be found by anyone with a similar problem.