As long as you're not in 1950s US and vote for a socialist, or vote against the communist party in any eastern European country for much of the 20th century, or against Putin or the CCP, or vote conservative and have aspirations in academia [1], then yes, there is an extremely limited range of times, countries, and opinions, for which non-secret voting wouldn't be absolutely catastrophic.
[1] https://www.washingtontimes.com/news/2012/aug/1/liberal-majo... -- "One respondent wrote in that if department members “could figure out who was a conservative, they would be sure not to hire them.”"