Can I answer a Stackexchange question if some of the content will be published in a paper in the near future? Could it impede my publication?
That depends exclusively on the policies of the journal. Most journals have a policy that excludes some forms of previously published content, but what counts as 'publishing' on that account varies very much from journal to journal. Some venues take that to mean exclusively publication of exactly that material in a peer-reviewed journal; others use broad definitions where any publicly accessible material counts. In physics, most journals tend to go towards the first case (so e.g. a preprint in arXiv doesn't count as a previous publication of the material), but in other fields this is not necessarily the case.
The thing to do, then, (as always when pre-publishing material that may wind up in a journal publication,) is to check your prospective venue's policies on that regard.