There is a plethora of online simplified to traditional characters converter like this one: https://www.chinese-tools.com/tools/converter-simptrad.html
Is it safe to use them? Won't it cause any mistakes in "translation"? My question boiles down to:
Is the mapping between traditional and simplified characters a one-to-one function? That is, does every simplified character only one traditional character equivalent?
If not, could you list the most prominent examples?
六宫即前一宫,后五宫。后五宫指后一宫;三夫人一宫;九嫔一宫;二十七世妇一宫;八十一御妻一宫。
This text is very unlikely to pass an automatic character mapper from Simplified to Traditional.