All praise is due to Allah, and may peace and blessings be upon the Messenger of Allah.
Some sorcerers may seek the help of jinn to control them or imprison them. They do so by seeking closeness to rebellious jinn through forbidden practices that may even amount to disbelief. Therefore, it is not permissible to visit such sorcerers or believe their claims.
As for someone who claims to be Muslim, does not seek the help of jinn, yet claims to be capable of imprisoning them inside bottles, his claim should not be accepted merely on the basis of his words. There is no reliable way to verify the truthfulness of such a claim. He may be lying or deluded, and jinn themselves may also lie about the information they provide.
It is authentically established in Sahih al-Bukhari that the Prophet Muhammad ﷺ seized an Ifrit (a powerful jinni) and intended to tie him to one of the pillars of the mosque. However, he refrained from doing so, remembering the supplication of Prophet Solomon (peace be upon him).
This indicates that imprisoning a jinni is possible in itself, but it does not establish that everyone who claims to possess this ability can actually do it.
Conclusion: It is not permissible to believe someone who claims to control or imprison jinn without evidence, nor is it permissible to seek the help of sorcerers or visit them. A Muslim should instead occupy himself with what benefits him and avoid pursuing matters that offer no real benefit.
And Allah knows best.