That works fine for physical machines, but if you're talking about software, then copyright protections, DMCA, and CFAA apply too, which makes reverse engineering also illegal.
And you cannot make a trade secret or a trademark something that's visible and nonspecific, like say UI design or look of hardware, placement of buttons etc. But you can make a design patent.
Patents make trade secrets stronger, especially if the patent is just part of the story.