I have met this problem recently, so I add a side feather to a tool I have built previously.
This tool has perfectly solved this problem.
Here is its github link: https://github.com/KyleBing/wubi-dict-editor
How it works, import a formatted text file with code and word on it, then the tool will process this file. all you need to do is select words you want to export to plist and press the export button, a list file with words in it will automatically generate on your desktop.
content before is
工 a
戈 a
式 aa
戒 aa
工 aaa
工 aaaa
after is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>phrase</key>
<string>工</string>
<key>shortcut</key>
<string>a</string>
</dict>
<dict>
<key>phrase</key>
<string>戈</string>
<key>shortcut</key>
<string>a</string>
</dict>
<dict>
<key>phrase</key>
<string>式</string>
<key>shortcut</key>
<string>aa</string>
</dict>
<dict>
<key>phrase</key>
<string>戒</string>
<key>shortcut</key>
<string>aa</string>
</dict>
<dict>
<key>phrase</key>
<string>工</string>
<key>shortcut</key>
<string>aaa</string>
</dict>
</array>
</plist>