As far as I can remember, the French-Swiss border has never been watched intensively. Back in the 1980s, before Switzerland joined the Schengen area, it wasn't officially as open as today but enforcement was already very lax compared to other international borders in the world. At smaller crossings, the boom barrier would be lowered at night and a sign invited people to present themselves to another crossing. It would make it marginally more difficult to cross with a vehicle but numerous footpaths or stretches of fields have always been wide open without so much as a low fence or marking between countries.
That is to say someone who is determined to cross irregularly always could do it easily. Short of militarizing a border, Berlin wall or Korean DMZ-style, it is very difficult to fully prevent that from happening at all. Currently, you can see some efforts to harden borders between the US and Mexico, at the Greece/Bulgaria-Turkey border, on the Hungarian border, or in Ceuta and Melilla but effectiveness is mixed at best despite significant investments and questionable practices.
Going that way would be hugely disruptive in areas relying heavily on cross-border work, where people routinely go shopping in the neighboring countries or even have agricultural land straddling the border. Switzerland is (rightfully) not willing to pay for the costs of a hard border. Currently, it's not even willing to pay to meet its recruitment targets for border guards. Last I heard, many positions in the Geneva area were unfilled (in part because pay is not attractive) and municipalities were in charge of lowering barriers at night (to relieve the border force).
In any case, then, as now, inspections on the French-Swiss border were far from systematic. It was more common to see someone wave you through (as opposed to seeing nobody at all) but border guards would not talk to every traveller, let alone check their documents. The fact is that the people who are targeted by border forces do not necessarily have the resources or know-how to exploit these weaknesses and enforcement is focused on low-hanging fruits. Checks have always been more thorough (and more intrusive) in busses and trains than other means of transportation. Taking the train between Amsterdam and Basel, you could even feel the difference depending on the class of travel (e.g. being woken up, asked questions and opening your luggage at 6 in the morning vs. handing over your passport to the attendant and sleeping soundly through the border).
And why would they want to do more? In spite of popular belief, the majority of undocumented migrants enter legally (e.g. on a short-term or student visa) and lose their status further down the line. You cannot prevent that by hardening the land border. In actual fact, police or customs catches at the border (whether we are talking people entering illegally, illegal imports of potential legal products, or things like drugs and arms) do not stem mainly from random inspections but rather from investigations and especially informants and tips.
Currently border guards are not even supposed to check documents or keep non-visa holders at bay, that's not the function of the border at all. Switzerland joined the Schengen area and as such committed to lifting systematic checks for people at its border with France, Italy, Austria, and Germany (Liechtenstein is another story but I don't think that border is heavily policed either). The border infrastructure is here for customs enforcement, i.e. checking goods not people (an anecdote: I once crossed the border by car somewhere in the Neuchâtel area and as far as I recall, the guard didn't check our ID or did it very superficially, didn't ask many questions regarding our destination but instead studied very carefully the receipt from the local supermarket we just stopped at; that receipt was organised by categories, making it easier to check the total amount of meat or dairy, which are regulated).
Being part of the Schengen area means that almost all visitors have a visa covering both Switzerland and its neighbors (Schengen visa) and that all these countries implement the same entry rules. People who have long-stay visas or residence permits for one of these countries can also visit the others for up to 90 days. The main category of people who have the right to be in France or Germany but not to cross the Swiss border are people under some kind of temporary authorisation while their application for another status is pending and especially asylum seekers.
The Schengen area has another procedure to deal with asylum seeker moving between countries: the Dublin system. It's not working very well and that's why you do see some enforcement on the border with Italy (in both France and Switzerland). That's not an issue on the Swiss-French Swiss-German border as far as I know (it briefly was at the border between Austria and Germany in 2015).