At most international airports in the EEA, there are separate "red" and "green" customs lanes. If you go through the green lane, you are stating that you have nothing to declare. In theory, you can be searched, and if you are carrying contraband or goods which should have been declared, you can be fined or even arrested for smuggling. In practice, most people don't get searched, and the green lanes are sometimes unmanned altogether (or at least, not visibly manned). One could imagine Ireland and the UK passing a law stating that the entirety of the Irish border is a "green lane" for customs purposes, perhaps with a few designated crossing areas to serve as "red lanes" for people with goods to declare, and (maybe) with a very small number of travelers randomly stopped and searched. It's not entirely clear to me that this would uphold the strict letter of the Good Friday Agreement, but it would arguably uphold its spirit (provided the random searches truly are minimally invasive and greatly infrequent), and the UK and Ireland could sign a treaty modifying the GFA to that effect.
Obviously, there are a lot of problems with this approach. It would be a very porous border in both directions. Unlike at an airport, you don't have a comprehensive manifest of everyone going into or out of the customs area, nor do you have pervasive surveillance, so it's harder (read: practically impossible) to follow up on suspected smuggling. Various Euroskeptic groups within the UK have made noises about "technical solutions" to this problem, but it's unclear that those solutions can be fully implemented by November 1, 2019, which at the time of writing is the date the UK is due to leave the EU.
On the other hand, it likely would prevent law-abiding companies from bringing products across the border without paying customs dues, because that would be illegal. In your hypothetical, where pineapples are illegal on one side of the border, no "regular" grocery company is going to import them across the border, because they cannot be sold except on the black market, and no law-abiding company wants to get involved with that sort of thing. Similarly, if pineapples are legal but have a high tariff, no "regular" company is going to import them without declaring, because otherwise a simple audit of their books would reveal the discrepancy.
In principle, a less reputable company might deliberately mislabel (to use a real example) chlorinated chicken in order to import it into the EEA and sell it as untreated chicken, but it's not clear to me that a "hard" customs border would actually detect or prevent such mislabeling, so I'm not sure it's relevant. Nevertheless, a "soft" border as described above certainly wouldn't make enforcement any easier than it is now, and could make it harder, depending on how regulators choose to approach the problem.
Finally, I should point out that all of the above assumes the cooperation of both Ireland in particular and the EU as a whole. On the one hand, it substantially weakens the customs union in order to provide a significant benefit to a non-member of the EU. On the other, the Irish border has long been a source of conflict and sectarian violence, and the original purpose of the EU is the promotion of peace on the European continent. Given the current direction of Brexit politics, I think most of what I have described above is unlikely to come to pass, but this seems equally true of every way forward that I can imagine. Brexit is the political quandary of the century.