Mark Allen came back from the brink to win his first-round match against Southend amateur Sydney Wilson at the Welsh Open.