The verb あく for example can be written as 開く 空く 明く with all of them being read the same way. In the dictionary they are all listed under the same item but looking at the translation you can see that each kanji variation seems to have it's own meaning. In the dictionary it's written like:
(especially 開く) to open (e.g. doors)
As far as I have understood, 開く is used when something opens, 空く when something is empty and 明く when something is open / has been opened. What confuses me however is the word in brackets "especially", which seems to imply that it isn't always used like described. So can 開く for example also be used to mean "to be empty" or 明く to mean "to open"? And if so, how common is it to not stick with the meanings as described in the dictionary? Does doing so make the sentence look a bit strange but is still correct? Also this isn't just the case for あく, there are many more words in the dictionary like
元 本 素 基
玉 球 弾
Is it for every word with multiple variations a different story whether it's possible or not? (I mean, does answering the questions for あく also answer the questions for every other word or does it always depend and I should just always stick to the recommended kanji before doing anything wrong?)
The only thing I know so far is that words like あく already existed before writing in Japan and that they also had these different meanings which couldn't all be covered with just one kanji.