Every factory will not leave idle people, and the company's training of people is limited! Unless you are a newcomer, there will usually be a probation period of several months to get familiar with it. You've been working for so long, the boss certainly doesn't like to see you doing your own thing during working hours. If you go to other factories, it is understandable for them to do so. The boss asked you to create benefits for him, otherwise who would be so kind? You have a good attitude towards learning. With such a platform, you can't do your own private affairs in front of your boss. Isn't this a challenge to his authority? You can do your own thing secretly when the boss is away, or do your own thing after work.
I think you are lucky to find a suitable job near your home and have the opportunity to study. I suggest you don't resign, but you should adjust your work style.